maskit commented on code in PR #13088:
URL: https://github.com/apache/trafficserver/pull/13088#discussion_r3104261995


##########
src/iocore/net/SSLClientUtils.cc:
##########
@@ -247,6 +248,25 @@ SSLInitClientContext(const SSLConfigParams *params)
   }
 #endif
 
+  if (params->client_cert_compression_algorithms) {
+    std::vector<std::string> algs;
+    std::string_view         algs_sv = 
params->client_cert_compression_algorithms;
+    size_t                   pos     = 0;
+
+    while (pos < algs_sv.size()) {
+      auto comma = algs_sv.find(',', pos);
+      if (comma == std::string_view::npos) {
+        comma = algs_sv.size();
+      }
+      auto alg = algs_sv.substr(pos, comma - pos);
+      if (!alg.empty()) {
+        algs.emplace_back(alg);
+      }
+      pos = comma + 1;
+    }
+    register_certificate_compression_preference(client_ctx, algs);

Review Comment:
   fixed



##########
src/iocore/net/SSLUtils.cc:
##########
@@ -435,6 +436,36 @@ DH_get_2048_256()
 }
 #endif
 
+bool
+SSLMultiCertConfigLoader::_enable_cert_compression(SSL_CTX *ctx)
+{
+  std::vector<std::string> algs;
+
+  if (this->_params->server_cert_compression_algorithms) {
+    std::string_view algs_sv = 
this->_params->server_cert_compression_algorithms;
+    size_t           pos     = 0;
+
+    while (pos < algs_sv.size()) {
+      auto comma = algs_sv.find(',', pos);
+      if (comma == std::string_view::npos) {
+        comma = algs_sv.size();
+      }
+      auto alg = algs_sv.substr(pos, comma - pos);
+      if (!alg.empty()) {
+        algs.emplace_back(alg);
+      }
+      pos = comma + 1;

Review Comment:
   fixed



-- 
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