mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
import Ruby/OpenSSL 2.0.0.beta.1
* NEWS, {ext,test,sample}/openssl: Import Ruby/OpenSSL 2.0.0.beta.1.
ext/openssl is now converted into a default gem. The full commit
history since r55538 can be found at:
08e1881f56
...v2.0.0.beta.1
[Feature #9612]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
28bf4d545f
commit
c9dc0164b8
69 changed files with 2970 additions and 1813 deletions
|
@ -14,7 +14,7 @@ class OpenSSL::TestEngine < OpenSSL::TestCase
|
|||
def test_openssl_engine_builtin
|
||||
with_openssl <<-'end;'
|
||||
orig = OpenSSL::Engine.engines
|
||||
skip "'openssl' is already loaded" if orig.any? { |e| e.id == "openssl" }
|
||||
pend "'openssl' is already loaded" if orig.any? { |e| e.id == "openssl" }
|
||||
engine = OpenSSL::Engine.load("openssl")
|
||||
assert_equal(true, engine)
|
||||
assert_equal(1, OpenSSL::Engine.engines.size - orig.size)
|
||||
|
@ -24,7 +24,7 @@ class OpenSSL::TestEngine < OpenSSL::TestCase
|
|||
def test_openssl_engine_by_id_string
|
||||
with_openssl <<-'end;'
|
||||
orig = OpenSSL::Engine.engines
|
||||
skip "'openssl' is already loaded" if orig.any? { |e| e.id == "openssl" }
|
||||
pend "'openssl' is already loaded" if orig.any? { |e| e.id == "openssl" }
|
||||
engine = get_engine
|
||||
assert_not_nil(engine)
|
||||
assert_equal(1, OpenSSL::Engine.engines.size - orig.size)
|
||||
|
@ -72,11 +72,18 @@ class OpenSSL::TestEngine < OpenSSL::TestCase
|
|||
end;
|
||||
end
|
||||
|
||||
def test_dup
|
||||
with_openssl <<-'end;'
|
||||
engine = get_engine
|
||||
assert_raise(NoMethodError) { engine.dup }
|
||||
end;
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
# this is required because OpenSSL::Engine methods change global state
|
||||
def with_openssl(code)
|
||||
assert_separately(["-ropenssl"], <<~"end;")
|
||||
assert_separately([{ "OSSL_MDEBUG" => nil }, "-ropenssl"], <<~"end;")
|
||||
require #{__FILE__.dump}
|
||||
include OpenSSL::TestEngine::Utils
|
||||
#{code}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue