Copilot commented on code in PR #13471:
URL: https://github.com/apache/trafficserver/pull/13471#discussion_r3696242764
##########
src/iocore/net/SSLUtils.cc:
##########
@@ -859,20 +852,6 @@ SSLPrivateKeyHandler(SSL_CTX *ctx, const char *keyPath,
const char *secret_data,
// SSL_CTX_use_PrivateKey() takes its own reference on the key, so this
// reference must be released on every exit.
scoped_PKEY pkey;
-#if HAVE_ENGINE_GET_DEFAULT_RSA && HAVE_ENGINE_LOAD_PRIVATE_KEY
- ENGINE *e = ENGINE_get_default_RSA();
- if (e != nullptr) {
- pkey.reset(ENGINE_load_private_key(e, keyPath, nullptr, nullptr));
- if (pkey) {
- if (!SSL_CTX_use_PrivateKey(ctx, pkey.get())) {
- Dbg(dbg_ctl_ssl_load, "failed to load server private key from engine");
- return false;
- }
- }
- }
-#else
- void *e = nullptr;
-#endif
if (pkey == nullptr) {
scoped_BIO bio(BIO_new_mem_buf(secret_data, secret_data_len));
Review Comment:
After removing OpenSSL ENGINE support, this function still references `e`
later (`if (e == nullptr && !SSL_CTX_check_private_key(ctx))`), but `e` is no
longer declared anywhere, which will break the build. The check should now be
unconditional.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]