File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -433,6 +433,15 @@ def test_s_from_parameters_dh_with_invalid_parameter
433433 e = assert_raise ( OpenSSL ::PKey ::PKeyError ) { OpenSSL ::PKey . from_parameters ( "DH" , invalid : 1234 ) }
434434 assert_match ( /Invalid parameter "invalid"/ , e . message )
435435 end
436+
437+ def test_s_from_parameters_ed25519
438+ # Ed25519 is not FIPS-approved.
439+ omit_on_fips
440+
441+ key = OpenSSL ::PKey . from_parameters ( "ED25519" , pub : "\xD0 \x8E \xA8 \x96 \xB6 Fbi{$k\xAC \xB8 \xA2 V\xF4 n\xC3 \xD0 6}R\x8A \xE6 I\xA7 r\xF6 D{W\x84 " )
442+ assert_instance_of OpenSSL ::PKey ::PKey , key
443+ assert_equal "-----BEGIN PUBLIC KEY-----\n MCowBQYDK2VwAyEA0I6olrZGYml7JGusuKJW9G7D0DZ9UormSady9kR7V4Q=\n -----END PUBLIC KEY-----\n " , key . public_to_pem
444+ end
436445 else
437446 def test_from_parameter_raises_on_pre_3_openssl
438447 e = assert_raise ( OpenSSL ::PKey ::PKeyError ) {
You can’t perform that action at this time.
0 commit comments