maskit commented on a change in pull request #7150:
URL: https://github.com/apache/trafficserver/pull/7150#discussion_r479837982
##########
File path: iocore/net/SSLUtils.cc
##########
@@ -927,36 +928,40 @@ SSLPrivateKeyHandler(SSL_CTX *ctx, const SSLConfigParams
*params, const std::str
} else {
argkey = Layout::get()->relative_to(params->serverKeyPathOnly, keyPath);
}
- if (!SSL_CTX_use_PrivateKey(ctx, ENGINE_load_private_key(e, argkey,
nullptr, nullptr))) {
- SSLError("failed to load server private key from engine");
+ pkey = ENGINE_load_private_key(e, argkey.get(), nullptr, nullptr);
+ if (pkey) {
+ if (!SSL_CTX_use_PrivateKey(ctx, pkey)) {
+ SSLError("failed to load server private key from engine");
Review comment:
Not really new, but seems like we should return false here.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]