log the internal error message from *SSL when the cert and private key doesn't match#14023
log the internal error message from *SSL when the cert and private key doesn't match#14023ggreenway merged 2 commits intoenvoyproxy:masterfrom qudongfang:better_error_msg_on_tls_cert_key_mismatch
Conversation
|
Hi @qudongfang, welcome and thank you for your contribution. We will try to review your Pull Request as quickly as possible. In the meantime, please take a look at the contribution guidelines if you have not done so already. |
…ivate doesn't match. Signed-off-by: Dongfang Qu <qudongfang@gmail.com>
| absl::StrCat("Failed to load private key from ", tls_certificate.privateKeyPath())); | ||
| throw EnvoyException(fmt::format("Failed to load private key from {}, Cause: {}", | ||
| tls_certificate.privateKeyPath(), | ||
| Utility::getLastCryptoError().value_or("not found"))); |
There was a problem hiding this comment.
"not found" here is misleading, since it sounds like file was not found.
There was a problem hiding this comment.
Yeah, I think you're right.
Does Unknown sound sane to you?
There was a problem hiding this comment.
"unknown" sounds fine, but all other uses of Utility::getLastCryptoError() in this file use .value_or("").
I'm fine with either.
There was a problem hiding this comment.
Cool, I updated it.
At the same time, I noticed that there're a few other places that we haven't checked the internal error messages.
I'd like to help if you think it's nice to have them.
Signed-off-by: Dongfang Qu <qudongfang@gmail.com>
ggreenway
left a comment
There was a problem hiding this comment.
LGTM. Thanks! I always like improving error reporting.
|
/retest |
|
Retrying Azure Pipelines: |
* master: (117 commits) vrp: allow supervisord to open its log file (envoyproxy#14066) [http1] fix H/1 response pipelining (envoyproxy#13983) wasm: make dependency clearer (envoyproxy#14062) docs: updating 100-continue docs (envoyproxy#14040) quiche: fix stream trailer decoding issue (envoyproxy#13871) tidy: use last_github_commit script instead of target branch (envoyproxy#14052) stats: use RE2 and a better pattern to accelerate a single stats tag-extraction RE (envoyproxy#8831) wasm: use static registration for runtimes (envoyproxy#14014) grpc-json-transcoder: Add support for configuring unescaping behavior (envoyproxy#14009) ci: fix CodeQL-build by removing deprecated set-env command (envoyproxy#14046) config: fix crash when type URL doesn't match proto. (envoyproxy#14031) Build: Propagate user-supplied tags to external headers library. (envoyproxy#14016) [test host utils] use make_shared to avoid memory leaks (envoyproxy#14042) jwt_authn: update to jwt_verify_lib with 1 minute clock skew (envoyproxy#13872) quiche: update QUICHE tar (envoyproxy#13949) sds: improve watched directory documentation. (envoyproxy#14029) log the internal error message from *SSL when the cert and private key doesn't match (envoyproxy#14023) wasm: fix CPE for Wasmtime. (envoyproxy#14024) docs: Bump sphinxext-rediraffe version (envoyproxy#13996) CDS: remove warming cluster if CDS response desired (envoyproxy#13997) ...
…y doesn't match (envoyproxy#14023) Fixes envoyproxy#14022 Signed-off-by: Dongfang Qu <qudongfang@gmail.com>
…y doesn't match (envoyproxy#14023) Fixes envoyproxy#14022 Signed-off-by: Dongfang Qu <qudongfang@gmail.com> Signed-off-by: Qin Qin <qqin@google.com>
Issue #14022