From 41df7e00cc5b9cac2f04b816713fd2ac2d31c1d4 Mon Sep 17 00:00:00 2001 From: Artem Golotin Date: Wed, 19 Oct 2016 11:41:14 -0600 Subject: [PATCH] Fix issue when ssl cert bundle fails to be loaded unless you perform ssl verification --- lib/logstash/inputs/tcp.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/logstash/inputs/tcp.rb b/lib/logstash/inputs/tcp.rb index 56d9863..878d5bc 100644 --- a/lib/logstash/inputs/tcp.rb +++ b/lib/logstash/inputs/tcp.rb @@ -218,8 +218,8 @@ def ssl_context @ssl_context = OpenSSL::SSL::SSLContext.new @ssl_context.cert = OpenSSL::X509::Certificate.new(File.read(@ssl_cert)) @ssl_context.key = OpenSSL::PKey::RSA.new(File.read(@ssl_key),@ssl_key_passphrase.value) + @ssl_context.cert_store = load_cert_store if @ssl_verify - @ssl_context.cert_store = load_cert_store @ssl_context.verify_mode = OpenSSL::SSL::VERIFY_PEER|OpenSSL::SSL::VERIFY_FAIL_IF_NO_PEER_CERT end rescue => e