summaryrefslogtreecommitdiff
path: root/ext/openssl/lib
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-09-02 11:41:33 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-09-02 11:41:33 +0000
commit28e962d92cdaa1ec8651a48d09ea318ddaae8368 (patch)
tree523f0e2c9c7de977b1104f31ca3733b85e4abe52 /ext/openssl/lib
parent05bb6b505c1be3169a9c1e2bdd18c0c0ade0e9d4 (diff)
* ext/openssl/lib/net/protocols.rb (SSLIO#ssl_connect): warning
for skipping server verification. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/lib')
-rw-r--r--ext/openssl/lib/net/protocols.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/openssl/lib/net/protocols.rb b/ext/openssl/lib/net/protocols.rb
index 25e940c..36c5077 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