Copilot commented on code in PR #13197:
URL: https://github.com/apache/trafficserver/pull/13197#discussion_r3293555583
##########
src/iocore/net/TLSCertCompression.cc:
##########
@@ -107,16 +121,24 @@ register_certificate_compression_preference(SSL_CTX *ctx,
const std::vector<std:
}
return 1;
#elif HAVE_SSL_CTX_SET1_CERT_COMP_PREFERENCE
- int algs[N_ALGORITHMS];
+ int algs[countof(supported_algs)];
int n = 0;
for (unsigned int i = 0; i < specified_algs.size(); ++i) {
+ struct alg_info *info = nullptr;
+
for (unsigned int j = 0; j < countof(supported_algs); ++j) {
if (strcmp(specified_algs[i].c_str(), supported_algs[j].name) == 0) {
- algs[n++] = supported_algs[j].number;
- Dbg(dbg_ctl_ssl_cert_compress, "Enabled %s", supported_algs[j].name);
+ info = &supported_algs[j];
+ break;
}
}
+ if (info == nullptr || !info->available) {
+ Dbg(dbg_ctl_ssl_cert_compress, "Unrecognized algorithm: %s",
specified_algs[i].c_str());
+ return 0;
Review Comment:
The debug log message here says "Unrecognized algorithm" even when the
algorithm name is recognized but marked unavailable (e.g., OpenSSL built with
OPENSSL_NO_BROTLI/OPENSSL_NO_ZSTD/OPENSSL_NO_ZLIB). This makes config failures
harder to diagnose. Consider splitting the cases so unknown names log as
unrecognized, and known-but-unavailable names log as disabled/unavailable
(ideally mentioning it was disabled in the OpenSSL build).
--
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]