bneradt commented on code in PR #13197:
URL: https://github.com/apache/trafficserver/pull/13197#discussion_r3304808006


##########
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:
   Unknown algorithm names still log as unrecognized, while 
recognized-but-unavailable algorithms now log that the algorithm was disabled 
by 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]

Reply via email to