@@ -82,8 +82,7 @@ def test_hmac_sign_verify
82
82
end
83
83
84
84
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
87
86
88
87
# Test vector from RFC 8032 Section 7.1 TEST 2
89
88
priv_pem = <<~EOF
@@ -101,7 +100,13 @@ def test_ed25519
101
100
pub = OpenSSL ::PKey . read ( pub_pem )
102
101
rescue OpenSSL ::PKey ::PKeyError
103
102
# 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
105
110
end
106
111
assert_instance_of OpenSSL ::PKey ::PKey , priv
107
112
assert_instance_of OpenSSL ::PKey ::PKey , pub
@@ -143,7 +148,7 @@ def test_ed25519
143
148
end
144
149
145
150
def test_x25519
146
- pend ( 'Not supported on FIPS mode enabled' ) if OpenSSL . fips_mode
151
+ pend_on_openssl_issue_21493
147
152
148
153
# Test vector from RFC 7748 Section 6.1
149
154
alice_pem = <<~EOF
@@ -197,7 +202,7 @@ def raw_initialize
197
202
end
198
203
199
204
def test_compare?
200
- pend ( 'Not supported on FIPS mode enabled' ) if OpenSSL . fips_mode
205
+ pend_on_openssl_issue_21493
201
206
202
207
key1 = Fixtures . pkey ( "rsa1024" )
203
208
key2 = Fixtures . pkey ( "rsa1024" )
0 commit comments