Skip to content

Commit 8149cdf

Browse files
committed
CI: Add the test/openssl/test_pkey.rb on the FIPS mode 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?`
1 parent ab92baf commit 8149cdf

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,5 +149,7 @@ jobs:
149149
# Run only the passing tests on the FIPS mode as a temporary workaround.
150150
# TODO Fix other tests, and run all the tests on FIPS mode.
151151
- name: test on fips mode
152-
run: ruby -Ilib test/openssl/test_fips.rb
152+
run: |
153+
ruby -I./lib -ropenssl \
154+
-e 'Dir.glob "./test/openssl/{test_fips.rb,test_pkey.rb}", &method(:require)'
153155
if: matrix.fips_enabled

test/openssl/test_pkey.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ def test_hmac_sign_verify
8282
end
8383

8484
def test_ed25519
85+
# https://github.com/openssl/openssl/issues/20758
86+
pend('Not supported on FIPS mode enabled') if OpenSSL.fips_mode
87+
8588
# Test vector from RFC 8032 Section 7.1 TEST 2
8689
priv_pem = <<~EOF
8790
-----BEGIN PRIVATE KEY-----
@@ -127,6 +130,8 @@ def test_ed25519
127130
end
128131

129132
def test_x25519
133+
pend('Not supported on FIPS mode enabled') if OpenSSL.fips_mode
134+
130135
# Test vector from RFC 7748 Section 6.1
131136
alice_pem = <<~EOF
132137
-----BEGIN PRIVATE KEY-----
@@ -153,6 +158,8 @@ def test_x25519
153158
end
154159

155160
def test_compare?
161+
pend('Not supported on FIPS mode enabled') if OpenSSL.fips_mode
162+
156163
key1 = Fixtures.pkey("rsa1024")
157164
key2 = Fixtures.pkey("rsa1024")
158165
key3 = Fixtures.pkey("rsa2048")

0 commit comments

Comments
 (0)