sohami commented on a change in pull request #1366: [DRILL-6581] C++ Client SSL 
Implementation Fixes/Improvements
URL: https://github.com/apache/drill/pull/1366#discussion_r201521602
 
 

 ##########
 File path: contrib/native/client/src/clientlib/channel.hpp
 ##########
 @@ -199,6 +248,29 @@ class UserProperties;
                 :Channel(ioService, host, port){
             }
             connectionStatus_t init();
+        protected:
+            /// @brief Handle protocol handshake exceptions for SSL specific 
failures.
+            /// 
+            /// @param in_errmsg                The error message.
+            /// 
+            /// @return the connectionStatus.
+            connectionStatus_t HandleProtocolHandshakeException(const char* 
errmsg) {
+                if (!(((SSLChannelContext_t 
*)m_pContext)->GetCertificateHostnameVerificationStatus())){
+                    return handleError(
+                        CONN_HANDSHAKE_FAILED,
+                        getMessage(ERR_CONN_SSL_CN));
 
 Review comment:
   Would be useful to preserve the original error message in this case as well. 
Please change to `getMessage(ERR_CONN_SSL_CN, errmsg)`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to