drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sohami <...@git.apache.org>
Subject [GitHub] drill pull request #809: Drill-4335: C++ client changes for supporting encry...
Date Fri, 12 May 2017 00:14:16 GMT
Github user sohami commented on a diff in the pull request:

    https://github.com/apache/drill/pull/809#discussion_r115527833
  
    --- Diff: contrib/native/client/src/clientlib/drillClientImpl.cpp ---
    @@ -370,6 +453,33 @@ void DrillClientImpl::handleHShakeReadTimeout(const boost::system::error_code
&
         return;
     }
     
    +/*
    + * Check's if client has explicitly expressed interest in encrypted connections only.
It looks for USERPROP_ENCRYPTION
    + * connection string property. If set to true then returns true else returns false
    + */
    +bool DrillClientImpl::clientNeedsEncryption(const DrillUserProperties* userProperties)
{
    +    bool needsEncryption = false;
    +    // check if userProperties is null
    +    if(!userProperties) {
    +        return needsEncryption;
    +    }
    +
    +    // Loop through the property to find USERPROP_ENCRYPTION and it's value
    +    for (size_t i = 0; i < userProperties->size(); i++) {
    --- End diff --
    
    DrillUserProperties has a _map_ and a _vector_. The _vector_ stores the actual prop key/value
pair and in _map_ we store the prop key and corresponding bits indicating _USERPROP_FLAGS_SERVERPROP|USERPROP_FLAGS_STRING_.
This is later used in handshake message to filter out the properties passed by client and
the one which is needed for server side to send along with handshake msg.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message