[release/10.0] Ensure SSL_CERT_DIR messages are always shown and check for existing value #64984
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport of #64970 to release/10.0
/cc @danegsta
Ensure SSL_CERT_DIR messages are always shown and check for existing value
Improved logging for SSL_CERT_DIR related messages on Unix
Description
Ensures EventLevel.LogAlways messages are shown for the dev-certs tool even when --verbose isn't specified to provide more visibility into setting the SSL_CERT_DIR environment variable on Linux. Checks to see if the environment variable is already set and, if so, provides specialized instructions on how to update. If the environment variable is already set and includes the dev cert trust path, we won't prompt. If it's set, but doesn't include the path, we instruct them to append instead of replace the value of the environment variable.
Customer Impact
When trusting the dev cert on Linux, the user isn't shown any log messages instructing them to setup the SSL_CERT_DIR environment variable pointing to the dev cert output folder for compatibility with OpenSSL certificate trust unless they run the trust command with
--verbose. This leads to a situation wheredev-certs https --trustreports the certificate as fully trusted (due to not considering whetherSSL_CERT_DIRis set correctly), while subsequent calls todev-certs https --checkreport the certificate as partially trusted.Now the existing
SSL_CERT_DIRlog messages will be reported even when--verboseisn't set.Regression?
[If yes, specify the version the behavior has regressed from]
Risk
This is primarily a logging change.
Verification
Packaging changes reviewed?
When servicing release/2.3