@@ -11,7 +11,7 @@ def test_generic_oid_inspect_rsa
1111 end
1212
1313 def test_generic_oid_inspect_x25519
14- omit "X25519 not supported" unless openssl? ( 1 , 1 , 0 ) || libressl? ( 3 , 7 , 0 )
14+ omit "X25519 not supported" if openssl? && ! openssl? ( 1 , 1 , 0 )
1515 omit_on_fips
1616
1717 # X25519 private key
@@ -85,8 +85,7 @@ def test_hmac_sign_verify
8585 def test_ed25519
8686 # Ed25519 is not FIPS-approved.
8787 omit_on_fips
88- # See EVP_PKEY_sign in Changelog for 3.7.0: https://github.com/libressl/portable/blob/master/ChangeLog
89- omit "Ed25519 not supported" unless openssl? ( 1 , 1 , 1 ) || libressl? ( 3 , 7 , 0 )
88+ omit "Ed25519 not supported" if openssl? && !openssl? ( 1 , 1 , 1 )
9089
9190 # Test vector from RFC 8032 Section 7.1 TEST 2
9291 priv_pem = <<~EOF
@@ -137,7 +136,7 @@ def test_ed25519
137136 end
138137
139138 def test_x25519
140- omit "X25519 not supported" unless openssl? ( 1 , 1 , 0 ) || libressl? ( 3 , 7 , 0 )
139+ omit "X25519 not supported" if openssl? && ! openssl? ( 1 , 1 , 0 )
141140 omit_on_fips
142141
143142 # Test vector from RFC 7748 Section 6.1
@@ -160,7 +159,7 @@ def test_x25519
160159 assert_equal bob_pem , bob . public_to_pem
161160 assert_equal [ shared_secret ] . pack ( "H*" ) , alice . derive ( bob )
162161
163- unless openssl? ( 1 , 1 , 1 ) || libressl? ( 3 , 7 , 0 )
162+ if openssl? && ! openssl? ( 1 , 1 , 1 )
164163 omit "running OpenSSL version does not have raw public key support"
165164 end
166165 alice_private = OpenSSL ::PKey . new_raw_private_key ( "X25519" , alice . raw_private_key )
@@ -176,7 +175,7 @@ def test_x25519
176175 end
177176
178177 def test_raw_initialize_errors
179- omit "Ed25519 not supported" unless openssl? ( 1 , 1 , 1 ) || libressl? ( 3 , 7 , 0 )
178+ omit "Ed25519 not supported" if openssl? && ! openssl? ( 1 , 1 , 1 )
180179
181180 assert_raise ( OpenSSL ::PKey ::PKeyError ) { OpenSSL ::PKey . new_raw_private_key ( "foo123" , "xxx" ) }
182181 assert_raise ( OpenSSL ::PKey ::PKeyError ) { OpenSSL ::PKey . new_raw_private_key ( "ED25519" , "xxx" ) }
0 commit comments