@@ -82,8 +82,7 @@ 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
85+ pend_on_openssl_issue_21493
8786
8887 # Test vector from RFC 8032 Section 7.1 TEST 2
8988 priv_pem = <<~EOF
@@ -101,7 +100,13 @@ def test_ed25519
101100 pub = OpenSSL ::PKey . read ( pub_pem )
102101 rescue OpenSSL ::PKey ::PKeyError
103102 # OpenSSL < 1.1.1
104- pend "Ed25519 is not implemented"
103+ if !openssl? ( 1 , 1 , 1 )
104+ pend "Ed25519 is not implemented"
105+ elsif OpenSSL . fips_mode && openssl? ( 3 , 1 , 0 , 0 )
106+ # See OpenSSL providers/fips/fipsprov.c PROV_NAMES_ED25519 entries
107+ # with FIPS_UNAPPROVED_PROPERTIES in OpenSSL 3.1+.
108+ pend "Ed25519 is not approved in OpenSSL 3.1+ FIPS code"
109+ end
105110 end
106111 assert_instance_of OpenSSL ::PKey ::PKey , priv
107112 assert_instance_of OpenSSL ::PKey ::PKey , pub
@@ -143,7 +148,7 @@ def test_ed25519
143148 end
144149
145150 def test_x25519
146- pend ( 'Not supported on FIPS mode enabled' ) if OpenSSL . fips_mode
151+ pend_on_openssl_issue_21493
147152
148153 # Test vector from RFC 7748 Section 6.1
149154 alice_pem = <<~EOF
@@ -197,7 +202,7 @@ def raw_initialize
197202 end
198203
199204 def test_compare?
200- pend ( 'Not supported on FIPS mode enabled' ) if OpenSSL . fips_mode
205+ pend_on_openssl_issue_21493
201206
202207 key1 = Fixtures . pkey ( "rsa1024" )
203208 key2 = Fixtures . pkey ( "rsa1024" )
0 commit comments