diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2016-11-29 00:16:58 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2016-11-29 00:16:58 +0900 |
commit | 27254de96db0c49bf11d8905f1d5bbc51e727093 (patch) | |
tree | 02336192f02b43d924f14999626b84bbbbd318cc /test/test_ssl.rb | |
parent | e94d3f3f2aef96a632ba0bf50e1a84f3c82a3825 (diff) | |
parent | 33b02f363b1a090fdcc4d0691cff7e2db1fbcf27 (diff) | |
download | ruby-openssl-27254de96db0c49bf11d8905f1d5bbc51e727093.tar.gz |
Merge branch 'topic/ssl-make-sslctx-freeze-alias-of-setup'
* topic/ssl-make-sslctx-freeze-alias-of-setup:
ssl: make OpenSSL::SSL::SSLContext#freeze an alias of #setup
Diffstat (limited to 'test/test_ssl.rb')
-rw-r--r-- | test/test_ssl.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/test_ssl.rb b/test/test_ssl.rb index 7f0b939c..ccdbf8e1 100644 --- a/test/test_ssl.rb +++ b/test/test_ssl.rb @@ -1252,6 +1252,18 @@ end sock2.close end + def test_freeze_calls_setup + bug = "[ruby/openssl#85]" + start_server(ignore_listener_error: true) { |server, port| + ctx = OpenSSL::SSL::SSLContext.new + ctx.verify_mode = OpenSSL::SSL::VERIFY_PEER + ctx.freeze + assert_raise(OpenSSL::SSL::SSLError, bug) { + server_connect(port, ctx) + } + } + end + private def start_server_version(version, ctx_proc = nil, |