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

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


The following commit(s) were added to refs/heads/branch-2.9 by this push:
     new 7923d544df9 Revert "Clean up C++ client curl configuration (#16064)"
7923d544df9 is described below

commit 7923d544df946bb9f5ce7ba8a62ae16aa2131138
Author: Yunze Xu <xyzinfern...@163.com>
AuthorDate: Wed Nov 2 17:29:01 2022 +0800

    Revert "Clean up C++ client curl configuration (#16064)"
    
    This reverts commit 3211f91ae91239fb58bc1c709b66f41dcc9023ed.
---
 pulsar-client-cpp/lib/auth/AuthOauth2.cc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/pulsar-client-cpp/lib/auth/AuthOauth2.cc 
b/pulsar-client-cpp/lib/auth/AuthOauth2.cc
index 31225b15a71..438239a46d6 100644
--- a/pulsar-client-cpp/lib/auth/AuthOauth2.cc
+++ b/pulsar-client-cpp/lib/auth/AuthOauth2.cc
@@ -186,6 +186,8 @@ void ClientCredentialFlow::initialize() {
     curl_easy_setopt(handle, CURLOPT_FORBID_REUSE, 1L);
 
     curl_easy_setopt(handle, CURLOPT_FOLLOWLOCATION, 1L);
+    curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 0L);
+    curl_easy_setopt(handle, CURLOPT_SSL_VERIFYHOST, 0L);
 
     char errorBuffer[CURL_ERROR_SIZE];
     curl_easy_setopt(handle, CURLOPT_ERRORBUFFER, errorBuffer);
@@ -309,6 +311,8 @@ Oauth2TokenResultPtr ClientCredentialFlow::authenticate() {
     curl_easy_setopt(handle, CURLOPT_FORBID_REUSE, 1L);
 
     curl_easy_setopt(handle, CURLOPT_FOLLOWLOCATION, 1L);
+    curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 0L);
+    curl_easy_setopt(handle, CURLOPT_SSL_VERIFYHOST, 0L);
 
     curl_easy_setopt(handle, CURLOPT_POSTFIELDS, postData.c_str());
 

Reply via email to