mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00

-- * ossl_config.c (ossl_config_add_value_m, ossl_config_set_section): Check if frozen (or untrusted for $SECURE >= 4) [ruby-core:18377] -- * test/openssl/test_config.rb (OpenSSL::TestConfig): new test case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@25945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
15 lines
304 B
Ruby
15 lines
304 B
Ruby
require 'openssl'
|
|
require "test/unit"
|
|
|
|
class OpenSSL::TestConfig < Test::Unit::TestCase
|
|
def test_freeze
|
|
c = OpenSSL::Config.new
|
|
c['foo'] = [['key', 'value']]
|
|
c.freeze
|
|
|
|
# [ruby-core:18377]
|
|
assert_raise(RuntimeError, /frozen/) do
|
|
c['foo'] = [['key', 'wrong']]
|
|
end
|
|
end
|
|
end
|