Skip to content

Commit c55a19a

Browse files
committed
wrap the ED25519 generate and skip the test if the algorithm is unsupported
1 parent 0b5991e commit c55a19a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/test_crypto.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,12 @@ def test_rsa_signing_verify_fail(self):
318318
self.assertFalse(rsa.verify(RSASignatureAlgorithm.PKCS1_5_SHA256, digest, b'bad signature'))
319319

320320
def test_ed25519_keygen(self):
321-
key = ED25519.new_generate()
321+
try:
322+
key = ED25519.new_generate()
323+
except RuntimeError as e:
324+
if "AWS_ERROR_CAL_UNSUPPORTED_ALGORITHM" in str(e):
325+
self.skipTest("ED25519 algorithm is unsupported on this platform")
326+
raise
322327

323328
self.assertEqual(32, len(key.export_public_key(ED25519ExportFormat.RAW)))
324329
self.assertEqual(32, len(key.export_private_key(ED25519ExportFormat.RAW)))

0 commit comments

Comments
 (0)