diff --git a/tests/infra/crypto.py b/tests/infra/crypto.py index d8066556191a..6efb24ae267c 100644 --- a/tests/infra/crypto.py +++ b/tests/infra/crypto.py @@ -70,6 +70,7 @@ def generate_aes_key(key_bits: int) -> bytes: def generate_rsa_keypair(key_size: int) -> Tuple[str, str]: + assert key_size >= 2048 priv = rsa.generate_private_key( public_exponent=RECOMMENDED_RSA_PUBLIC_EXPONENT, key_size=key_size, diff --git a/tests/npm_tests.py b/tests/npm_tests.py index 99e1aae4cffd..85cb37b5bab7 100644 --- a/tests/npm_tests.py +++ b/tests/npm_tests.py @@ -78,7 +78,7 @@ def generate_and_verify_jwk(client): assert body["pem"] == pub_pem # RSA - key_sizes = [1024, 2048, 4096] + key_sizes = [2048, 4096] for key_size in key_sizes: priv_pem, pub_pem = infra.crypto.generate_rsa_keypair(key_size)