Skip to content

Commit

Permalink
[ruby/openssl] CI: Add the test/openssl/test_pkey.rb on the FIPS mode…
Browse files Browse the repository at this point in the history
… case.

It's to test the `OpenSSL::PKey.read` in the `test/openssl/test_pkey.rb`.

I added the pending status to the following tests failing on the FIPS mode
case in the `test/openssl/test_pkey.rb`.

* `test_ed25519`
* `test_x25519`
* `test_compare?`

ruby/openssl@8149cdf6e8
  • Loading branch information
junaruga authored and rhenium committed Jun 18, 2023
1 parent 920bc71 commit 366d800
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/openssl/test_pkey.rb
Expand Up @@ -82,6 +82,9 @@ def test_hmac_sign_verify
end

def test_ed25519
# https://github.com/openssl/openssl/issues/20758
pend('Not supported on FIPS mode enabled') if OpenSSL.fips_mode

# Test vector from RFC 8032 Section 7.1 TEST 2
priv_pem = <<~EOF
-----BEGIN PRIVATE KEY-----
Expand Down Expand Up @@ -127,6 +130,8 @@ def test_ed25519
end

def test_x25519
pend('Not supported on FIPS mode enabled') if OpenSSL.fips_mode

# Test vector from RFC 7748 Section 6.1
alice_pem = <<~EOF
-----BEGIN PRIVATE KEY-----
Expand All @@ -153,6 +158,8 @@ def test_x25519
end

def test_compare?
pend('Not supported on FIPS mode enabled') if OpenSSL.fips_mode

key1 = Fixtures.pkey("rsa1024")
key2 = Fixtures.pkey("rsa1024")
key3 = Fixtures.pkey("rsa2048")
Expand Down

0 comments on commit 366d800

Please sign in to comment.