diff options
| author | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-22 08:31:53 +0000 |
|---|---|---|
| committer | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-22 08:31:53 +0000 |
| commit | 8729ba2be9165bbb5aa368af7d7a253f4babae82 (patch) | |
| tree | 5936b85b869207c2e61fb7820c487181a4b04336 /lib/net/pop.rb | |
| parent | ed9b8604f049f9127e9b2752eea9d3c205407e19 (diff) | |
| download | ruby-8729ba2be9165bbb5aa368af7d7a253f4babae82.tar.gz ruby-8729ba2be9165bbb5aa368af7d7a253f4babae82.tar.xz ruby-8729ba2be9165bbb5aa368af7d7a253f4babae82.zip | |
* ext/openssl/lib/net/ssl.rb (OpenSSL::SSL::SSLContext.build): removed.
* ext/openssl/lib/net/ssl.rb (OpenSSL::SSL::SSLContext#set_params):
new method to set suitable SSL parameters.
* lib/net/pop.rb, lib/net/http.rb, lib/net/imap.rb,
test/openssl/test_ssl.rb: follow above change.
* test/net/http/test_https.rb: refine error case.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net/pop.rb')
| -rw-r--r-- | lib/net/pop.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/net/pop.rb b/lib/net/pop.rb index 6b21da189..cbe563027 100644 --- a/lib/net/pop.rb +++ b/lib/net/pop.rb @@ -328,7 +328,7 @@ module Net # Net::POP.enable_ssl(params = {}) # # Enable SSL for all new instances. - # +params+ is passed to OpenSSL::SSLContext.build. + # +params+ is passed to OpenSSL::SSLContext#set_params. def POP3.enable_ssl(*args) @ssl_params = create_ssl_params(*args) end @@ -441,7 +441,7 @@ module Net # Enables SSL for this instance. Must be called before the connection is # established to have any effect. # +params[:port]+ is port to establish the SSL connection on; Defaults to 995. - # +params+ (except :port) is passed to OpenSSL::SSLContext.build. + # +params+ (except :port) is passed to OpenSSL::SSLContext#set_params. def enable_ssl(verify_or_params = {}, certs = nil, port = nil) begin @ssl_params = verify_or_params.to_hash.dup @@ -534,7 +534,8 @@ module Net s = timeout(@open_timeout) { TCPSocket.open(@address, port) } if use_ssl? raise 'openssl library not installed' unless defined?(OpenSSL) - context = OpenSSL::SSL::SSLContext.build(@ssl_params) + context = OpenSSL::SSL::SSLContext.new + context.set_params(@ssl_params) s = OpenSSL::SSL::SSLSocket.new(s, context) s.sync_close = true s.connect |
