From dfb1252e8170af88e0730fc994f3e65120c8eb95 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 20 Dec 2014 04:11:31 +0000 Subject: openssl_client: ignore SSL_accept errors during negotiotion Otherwise, we may encounter too much log spam from ordinary shutdown or malicious (or dumb) clients which send us invalid data to an SSL port. --- lib/yahns/openssl_client.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/yahns/openssl_client.rb b/lib/yahns/openssl_client.rb index e4e76c9..619e316 100644 --- a/lib/yahns/openssl_client.rb +++ b/lib/yahns/openssl_client.rb @@ -34,6 +34,8 @@ module Yahns::OpenSSLClient # :nodoc: return :wait_readable rescue IO::WaitWritable return :wait_writable + rescue OpenSSL::SSL::SSLError + return nil end @need_accept = false end -- cgit v1.2.3-24-ge0c7