lordgamez commented on code in PR #1583:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1583#discussion_r1224341797


##########
libminifi/test/SimpleSSLTestServer.h:
##########
@@ -50,11 +50,12 @@ class SimpleSSLTestServer  {
   };
 
  public:
-  SimpleSSLTestServer(const SSL_METHOD* method, int port, const 
std::filesystem::path& key_dir)
+  SimpleSSLTestServer(uint64_t disable_version, int port, const 
std::filesystem::path& key_dir)

Review Comment:
   Updated in 67eb58112fe948432498c39cae18aec78251fd22



##########
docker/test/integration/steps/steps.py:
##########
@@ -358,8 +358,8 @@ def step_impl(context):
 @given("an ssl context service set up for {producer_name} and {consumer_name}")
 def step_impl(context, producer_name, consumer_name):
     root_ca_cert, root_ca_key = make_ca("root CA")
-    minifi_cert, minifi_key = make_cert("minifi-cpp-flow", root_ca_cert, 
root_ca_key)
-    secondary_cert, secondary_key = make_cert("secondary", root_ca_cert, 
root_ca_key)
+    minifi_cert, minifi_key = make_cert("minifi-cpp-flow", root_ca_cert, 
root_ca_key, False)
+    secondary_cert, secondary_key = make_cert("secondary", root_ca_cert, 
root_ca_key, True)

Review Comment:
   Changed in 67eb58112fe948432498c39cae18aec78251fd22



##########
cmake/BundledOpenSSL.cmake:
##########
@@ -0,0 +1,128 @@
+# 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.
+
+function(use_openssl SOURCE_DIR BINARY_DIR)
+    message("Using bundled OpenSSL")
+
+    if(APPLE OR WIN32 OR CMAKE_SIZEOF_VOID_P EQUAL 4)
+        set(LIBDIR "lib")
+    else()
+        set(LIBDIR "lib64")
+    endif()
+
+    # Define byproducts
+    set(BYPRODUCT_PREFIX "lib" CACHE STRING "" FORCE)
+    if (WIN32)
+        set(BYPRODUCT_SUFFIX ".lib" CACHE STRING "" FORCE)
+    elseif (APPLE AND (CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|AMD64"))
+        set(BYPRODUCT_SUFFIX ".dylib" CACHE STRING "" FORCE)
+    else()
+        set(BYPRODUCT_SUFFIX ".a" CACHE STRING "" FORCE)
+    endif()
+
+    if (APPLE AND (CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|AMD64"))
+        set(OPENSSL_SHARED_FLAG "" CACHE STRING "" FORCE)

Review Comment:
   Added a comment in 67eb58112fe948432498c39cae18aec78251fd22



##########
README.md:
##########
@@ -151,6 +151,10 @@ and rebuild.
 * Lua and development headers -- Required if Lua support is enabled
 * libgps-dev -- Required if building libGPS support
 * Zlib headers
+* perl -- Required for OpenSSL configuration
+* NASM -- Required for OpenSSL only on Windows
+
+**NOTE** On Windows if Strawberry Perl is used the 
`${StrawberryPerlRoot}\c\bin` directory should not be part of the %PATH% 
variable as Strawberry Perl's patch.exe will be found as the patch executable 
in the configure phase instead if the git patch executable.

Review Comment:
   Fixed in 67eb58112fe948432498c39cae18aec78251fd22
   
   I'm not sure if we should add a note about Chocolatey as it is not a 
requirement for our build whereas Perl is, and StrawberryPerl is the most 
common implementation on Windows.



##########
libminifi/src/controllers/SSLContextService.cpp:
##########
@@ -112,6 +112,22 @@ const core::Property SSLContextService::ClientCertKeyUsage(
         ->build());
 #endif  // WIN32
 
+namespace {
+bool is_valid_and_readable_path(const std::filesystem::path& 
path_to_be_tested) {
+  std::ifstream file_to_be_tested(path_to_be_tested);
+  return file_to_be_tested.good();
+}
+
+#ifdef WIN32
+std::string getCertName(const utils::tls::X509_unique_ptr& cert) {
+  const size_t BUFFER_SIZE = 256;
+  char name_buffer[BUFFER_SIZE];
+  X509_NAME_oneline(X509_get_subject_name(cert.get()), name_buffer, 
BUFFER_SIZE);

Review Comment:
   Updated in 67eb58112fe948432498c39cae18aec78251fd22



##########
extensions/standard-processors/tests/integration/TLSServerSocketSupportedProtocolsTest.cpp:
##########
@@ -194,21 +195,21 @@ class SimpleSSLTestClient  {
 class SimpleSSLTestClientTLSv1  : public SimpleSSLTestClient {
  public:
   SimpleSSLTestClientTLSv1(const std::string& host, const std::string& port)
-      : SimpleSSLTestClient(TLSv1_client_method(), host, port) {
+      : SimpleSSLTestClient(SSL_OP_NO_SSLv3 | SSL_OP_NO_TLSv1_2 | 
SSL_OP_NO_TLSv1_1 | SSL_OP_NO_TLSv1_3, host, port) {

Review Comment:
   Updated to set_max and set_min in 67eb58112fe948432498c39cae18aec78251fd22



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to