[GitHub] jai1 commented on a change in pull request #1129: Added end to end encryption in C++ client

2018-01-29 Thread GitBox
jai1 commented on a change in pull request #1129: Added end to end encryption 
in C++ client
URL: https://github.com/apache/incubator-pulsar/pull/1129#discussion_r164591461
 
 

 ##
 File path: pulsar-client-cpp/lib/ProducerImpl.cc
 ##
 @@ -50,7 +50,9 @@ ProducerImpl::ProducerImpl(ClientImplPtr client, const 
std::string& topic, const
   producerStr_("[" + topic_ + ", " + producerName_ + "] "),
   producerId_(client->newProducerId()),
   msgSequenceGenerator_(0),
-  sendTimer_() {
+  sendTimer_(),
+  msgCrypto_(),
+  dataKeyGenInterval_(4 * 60 * 60) {
 
 Review comment:
   dataKeyGenIntervalInMs_ (time unit missing)


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jai1 commented on a change in pull request #1129: Added end to end encryption in C++ client

2018-01-29 Thread GitBox
jai1 commented on a change in pull request #1129: Added end to end encryption 
in C++ client
URL: https://github.com/apache/incubator-pulsar/pull/1129#discussion_r164589275
 
 

 ##
 File path: pulsar-client-cpp/lib/ConsumerConfigurationImpl.h
 ##
 @@ -31,13 +31,18 @@ struct ConsumerConfigurationImpl {
 int receiverQueueSize;
 std::string consumerName;
 long brokerConsumerStatsCacheTimeInMs;
+CryptoKeyReader* cryptoKeyReader;
 
 Review comment:
   Can we use shared pointer instead like we do for MessageRouter


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jai1 commented on a change in pull request #1129: Added end to end encryption in C++ client

2018-01-29 Thread GitBox
jai1 commented on a change in pull request #1129: Added end to end encryption 
in C++ client
URL: https://github.com/apache/incubator-pulsar/pull/1129#discussion_r164588488
 
 

 ##
 File path: pulsar-client-cpp/lib/ConsumerConfiguration.cc
 ##
 @@ -74,4 +74,30 @@ void 
ConsumerConfiguration::setUnAckedMessagesTimeoutMs(const uint64_t milliSeco
 }
 impl_->unAckedMessagesTimeoutMs = milliSeconds;
 }
+
+bool ConsumerConfiguration::isEncryptionEnabled() const {
+if (impl_->cryptoKeyReader != NULL) {
 
 Review comment:
   return impl_->cryptoKeyReader != NULL


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jai1 commented on a change in pull request #1129: Added end to end encryption in C++ client

2018-01-29 Thread GitBox
jai1 commented on a change in pull request #1129: Added end to end encryption 
in C++ client
URL: https://github.com/apache/incubator-pulsar/pull/1129#discussion_r164587853
 
 

 ##
 File path: pulsar-client-cpp/include/pulsar/ConsumerCryptoFailureAction.h
 ##
 @@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+#ifndef LIB_CONSUMERCRYPTOFAILUREACTION_H_
+#define LIB_CONSUMERCRYPTOFAILUREACTION_H_
+
+using namespace pulsar;
 
 Review comment:
   Remove this line


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:
us...@infra.apache.org


With regards,
Apache Git Services