Skip to content

Commit

Permalink
Forbid small keys in tests in a way that's hopefully picked up by Cod…
Browse files Browse the repository at this point in the history
…eQL (#6379)
  • Loading branch information
achamayou authored Jul 22, 2024
1 parent 9148742 commit 361e7ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/infra/crypto.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tests/npm_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 361e7ab

Please sign in to comment.