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


##########
extensions/standard-processors/tests/unit/ListenSyslogTests.cpp:
##########
@@ -434,4 +434,35 @@ TEST_CASE("ListenSyslog max queue and max batch size 
test", "[ListenSyslog]") {
   CHECK(controller.trigger().at(ListenSyslog::Success).empty());
 }
 
-}  // namespace org::apache::nifi::minifi::processors::testing
+TEST_CASE("Test ListenSyslog via TCP with SSL connection", "[ListenSyslog]") {
+  const auto listen_syslog = std::make_shared<ListenSyslog>("ListenSyslog");
+
+  SingleProcessorTestController controller{listen_syslog};
+  auto ssl_context_service = 
controller.plan->addController("SSLContextService", "SSLContextService");
+  REQUIRE(controller.plan->setProperty(ssl_context_service, 
controllers::SSLContextService::CACertificate.getName(),
+    minifi::utils::file::FileUtils::get_executable_dir() + 
"/resources/ca_cert.crt"));

Review Comment:
   Good point, updated in f3fb107052af05c62635ba3d4a9c1906c714d6fe



##########
libminifi/src/utils/net/SslServer.cpp:
##########
@@ -0,0 +1,91 @@
+/**
+ * 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 "utils/net/SslServer.h"
+
+namespace org::apache::nifi::minifi::utils::net {
+
+SslSession::SslSession(asio::io_context& io_context, asio::ssl::context& 
context, utils::ConcurrentQueue<Message>& concurrent_queue,
+    std::optional<size_t> max_queue_size, 
std::shared_ptr<core::logging::Logger> logger)
+  : concurrent_queue_(concurrent_queue),
+    max_queue_size_(max_queue_size),

Review Comment:
   Updated in f3fb107052af05c62635ba3d4a9c1906c714d6fe



-- 
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