Skip to content

Commit 8825032

Browse files
committed
[test] borrow some more DSA test from MRI's suite
1 parent 4193da0 commit 8825032

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/test/ruby/dsa/test_dsa.rb

+17
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,23 @@ def setup
77
super
88
end
99

10+
def test_private
11+
key = Fixtures.pkey("dsa1024")
12+
assert_equal true, key.private?
13+
key2 = OpenSSL::PKey::DSA.new(key.to_der)
14+
assert_equal true, key2.private?
15+
key3 = key.public_key
16+
assert_equal false, key3.private?
17+
key4 = OpenSSL::PKey::DSA.new(key3.to_der)
18+
assert_equal false, key4.private?
19+
end
20+
21+
def test_new
22+
key = OpenSSL::PKey::DSA.new(2048)
23+
pem = key.public_key.to_pem
24+
OpenSSL::PKey::DSA.new pem
25+
end
26+
1027
def test_dup
1128
key = Fixtures.pkey("dsa1024")
1229
key2 = key.dup

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy