From facbb92ba319373dd8b8baa171ac1d7978c926c5 Mon Sep 17 00:00:00 2001 From: Parth Chandra Date: Tue, 25 Jul 2017 09:22:23 -0700 Subject: DRILL-5431: SSL Support (C++) - Add (Netty like) socket abstraction that encapsulates a TCP socket or a SSL Stream on TCP. The testSSL program tests the client connection against a drillbit by sending a drill handshake. --- contrib/native/client/src/include/drill/common.hpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'contrib/native/client/src/include') diff --git a/contrib/native/client/src/include/drill/common.hpp b/contrib/native/client/src/include/drill/common.hpp index 5401c75a9..012bd1974 100644 --- a/contrib/native/client/src/include/drill/common.hpp +++ b/contrib/native/client/src/include/drill/common.hpp @@ -105,6 +105,11 @@ typedef boost::shared_ptr< std::vector > FieldDefPtr; class AllocatedBuffer; typedef AllocatedBuffer* AllocatedBufferPtr; +typedef enum{ + CHANNEL_TYPE_SOCKET=1, + CHANNEL_TYPE_SSLSTREAM=2 +} channelType_t; + typedef enum{ QRY_SUCCESS=0, QRY_FAILURE=1, @@ -136,7 +141,9 @@ typedef enum{ CONN_BAD_RPC_VER=8, CONN_DEAD=9, CONN_NOTCONNECTED=10, - CONN_ALREADYCONNECTED=11 + CONN_ALREADYCONNECTED=11, + CONN_SSLERROR=12, + CONN_NOSOCKET=13 } connectionStatus_t; typedef enum{ @@ -163,9 +170,13 @@ typedef enum{ #define USERPROP_USERNAME "userName" #define USERPROP_PASSWORD "password" #define USERPROP_SCHEMA "schema" -#define USERPROP_USESSL "useSSL" // Not implemented yet -#define USERPROP_FILEPATH "pemLocation" // Not implemented yet -#define USERPROP_FILENAME "pemFile" // Not implemented yet +#define USERPROP_USESSL "enableTLS" +#define USERPROP_TLSPROTOCOL "TLSProtocol" //TLS version +#define USERPROP_CERTFILEPATH "certFilePath" // pem file path and name +#define USERPROP_CERTPASSWORD "certPassword" // Password for certificate file +#define USERPROP_DISABLE_HOSTVERIFICATION "disableHostVerification" +#define USERPROP_DISABLE_CERTVERIFICATION "disableCertVerification" +#define USERPROP_USESYSTEMTRUSTSTORE "useSystemTrustStore" //Windows only, use the system trust store #define USERPROP_IMPERSONATION_TARGET "impersonation_target" #define USERPROP_AUTH_MECHANISM "auth" #define USERPROP_SERVICE_NAME "service_name" -- cgit v1.2.3