mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
05bb6b505c
commit
28e962d92c
2 changed files with 11 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue