summaryrefslogtreecommitdiff
path: root/lib/net/smtp.rb
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-10-08 11:14:41 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-10-08 11:14:41 +0000
commit3ecc791ddcc537e5eaa663254af6207e65da1a51 (patch)
tree4be462f3b2e6ca473e464c78401d1d78cf7ed945 /lib/net/smtp.rb
parent3465feb90b0d8401ad9b101929dbed11707a2eca (diff)
* lib/net/imap.rb, lib/net/smtp.rb, lib/net/pop.rb: hostname should
be verified against server's indentity as persented in the server's certificate. [ruby-dev:31960] * ext/openssl/lib/net/telnets.rb, ext/openssl/lib/net/ftptls.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net/smtp.rb')
-rw-r--r--lib/net/smtp.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/net/smtp.rb b/lib/net/smtp.rb
index 58cce32a71..84790450bc 100644
--- a/lib/net/smtp.rb
+++ b/lib/net/smtp.rb
@@ -578,6 +578,9 @@ module Net
logging "TLS connection started"
s.sync_close = true
s.connect
+ if @ssl_context.verify_mode != OpenSSL::SSL::VERIFY_NONE
+ s.post_connection_check(@address)
+ end
s
end