Skip to content

Commit

Permalink
Fix for review.
Browse files Browse the repository at this point in the history
  • Loading branch information
junaruga committed Aug 28, 2024
1 parent d00ce20 commit 2d3da44
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions test/openssl/test_pkey_rsa.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ def test_no_private_exp
end if !openssl?(3, 0, 0) # Impossible state in OpenSSL 3.0

def test_private
# Generated by key size and public exponent
key = OpenSSL::PKey::RSA.new(2048, 65537)
key = Fixtures.pkey("rsa2048")

# Generated by DER
key2 = OpenSSL::PKey::RSA.new(key.to_der)
Expand Down Expand Up @@ -50,12 +49,6 @@ def test_new
assert_equal 65537, key.e
assert_not_nil key.d
assert(key.private?)

key2 = OpenSSL::PKey::RSA.new(2048, 65537)
assert_equal 2048, key2.n.num_bits
assert_equal 65537, key2.e
assert_not_nil key2.d
assert(key.private?)
end

def test_new_public_exponent
Expand All @@ -72,11 +65,6 @@ def test_s_generate
key1 = OpenSSL::PKey::RSA.generate(2048)
assert_equal 2048, key1.n.num_bits
assert_equal 65537, key1.e

key2 = OpenSSL::PKey::RSA.generate(2048, 65537)
assert_equal 2048, key2.n.num_bits
assert_equal 65537, key2.e
assert_not_nil key2.d
end

def test_s_generate_public_exponent
Expand Down

0 comments on commit 2d3da44

Please sign in to comment.