pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] jai1 commented on a change in pull request #3577: Add LetsEncrypt as default trusted CA for C++ client
Date Wed, 13 Feb 2019 20:11:41 GMT
jai1 commented on a change in pull request #3577: Add LetsEncrypt as default trusted CA for
C++ client
URL: https://github.com/apache/pulsar/pull/3577#discussion_r256569801
 
 

 ##########
 File path: pulsar-client-cpp/lib/DefaultCAs.cc
 ##########
 @@ -0,0 +1,88 @@
+/**
+ * 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.
+ */
+
+#include "DefaultCAs.h"
+
+#include <array>
+#include <iostream>
+#include <fstream>
+#include <cstdio>
+#include <boost/asio/buffer.hpp>
+
+namespace pulsar {
+
+const static std::array<std::string, 1> CAcerts = {{
+
+    // LetsEncrypt root certificate
+    // from https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem.txt
+    // Subject: CN=Let's Encrypt Authority X3, O=Let's Encrypt, C=US
+    //  Validity: [From: Thu Mar 17 09:40:46 PDT 2016,
+    //               To: Wed Mar 17 09:40:46 PDT 2021]
+    R"(
+-----BEGIN CERTIFICATE-----
 
 Review comment:
   > This is a public certificate
   
   Public certs get expired or can be revoked, then it will become our headache to update
it on every release or every year. If for any reason we screw up and end up pulling a compromised/hacked
root cert instead - that will be really bad so we need to add a few additional steps to revalidate
this root cert.
   
   > When you install chrome/firefox you don't have to perform any operation, because the
ca certs come packaged in.
   
   What I was suggesting is to add it as a part of rpm but not as a part of the .so
   
   
   If for reason you still decide to add the root certs can you make it configurable cause
I am not sure if certain companies will want to add a new root cert.

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


With regards,
Apache Git Services

Mime
View raw message