summaryrefslogtreecommitdiffstats
path: root/ext/openssl/lib/net/protocols.rb
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
commit9c96d90fd01b2a6b3cdfc0de73c453165b665f6b (patch)
tree523f0e2c9c7de977b1104f31ca3733b85e4abe52 /ext/openssl/lib/net/protocols.rb
parent98fd5f5caef38b2349588537a2061452479f6ea1 (diff)
downloadruby-9c96d90fd01b2a6b3cdfc0de73c453165b665f6b.tar.gz
ruby-9c96d90fd01b2a6b3cdfc0de73c453165b665f6b.tar.xz
ruby-9c96d90fd01b2a6b3cdfc0de73c453165b665f6b.zip
* ext/openssl/lib/net/protocols.rb (SSLIO#ssl_connect): warning
for skipping server verification. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/lib/net/protocols.rb')
-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 25e940c54..36c5077cb 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