diff options
Diffstat (limited to 'ext/openssl/lib')
-rw-r--r-- | ext/openssl/lib/net/protocols.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/openssl/lib/net/protocols.rb b/ext/openssl/lib/net/protocols.rb index 25e940c54b..36c5077cb2 100644 --- a/ext/openssl/lib/net/protocols.rb +++ b/ext/openssl/lib/net/protocols.rb @@ -40,6 +40,10 @@ module Net end def ssl_connect() + unless @ssl_context.verify_mode + warn "warning: peer certificate won't be verified in this SSL session." + @ssl_context.verify_mode = OpenSSL::SSL::VERIFY_NONE + end @socket = OpenSSL::SSL::SSLSocket.new(@socket, @ssl_context) @socket.sync = true @socket.sync_close = true |