This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git


The following commit(s) were added to refs/heads/main by this push:
     new 739f0f0  Log the default location of trusted CA certificates when 
tlsTrustCertsFilePath is not specified (#429)
739f0f0 is described below

commit 739f0f0c808376f73f2b695726a7357e32625a3e
Author: Yunze Xu <[email protected]>
AuthorDate: Mon Jun 17 16:00:55 2024 +0800

    Log the default location of trusted CA certificates when 
tlsTrustCertsFilePath is not specified (#429)
    
    ### Motivation
    
    Currently when `tlsTrustCertsFilePath` is not specified, default
    locations of CA certificates will be used. However, these paths are
    determined by the compile option when building OpenSSL and they are
    invisible to users. If the OS uses a different path, the TLS connection
    will fail with no helpful error message.
---
 lib/ClientConnection.cc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/ClientConnection.cc b/lib/ClientConnection.cc
index 04202d3..9b78540 100644
--- a/lib/ClientConnection.cc
+++ b/lib/ClientConnection.cc
@@ -18,6 +18,7 @@
  */
 #include "ClientConnection.h"
 
+#include <openssl/x509.h>
 #include <pulsar/MessageIdBuilder.h>
 
 #include <boost/optional.hpp>
@@ -227,6 +228,7 @@ ClientConnection::ClientConnection(const std::string& 
logicalAddress, const std:
                 }
             } else {
                 ctx.set_default_verify_paths();
+                LOG_INFO("Use " << X509_get_default_cert_file() << " as 
default CA path");
             }
         }
 

Reply via email to