Skip to content

Commit

Permalink
Update RSA private key size to 2048 in test.
Browse files Browse the repository at this point in the history
This is required to unblock updating our
`cryptography` pin:

aws#8895

This test was ported 5 years ago as is using a key
size of 512:

aws#4846

As of `cryptography==43.0.0` the minimum key size
allowed is 512:

pyca/cryptography@83dcbc1

This change bumps it up to a more reasonable value
of 2048. This has only a couple hundredths of a
second time difference to generate as tested on my
Mac.
  • Loading branch information
kdaily committed Sep 6, 2024
1 parent c3a89d6 commit 456bf3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/unit/customizations/cloudtrail/test_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def setUp(self):
self._digest_data['_signature'] = 'aeff'

def test_validates_digests(self):
private_key = rsa.generate_private_key(65537, 512, default_backend())
private_key = rsa.generate_private_key(65537, 2048, default_backend())
sha256_hash = hashlib.sha256(self._inflated_digest)
string_to_sign = "%s\n%s/%s\n%s\n%s" % (
self._digest_data['digestEndTime'],
Expand Down

0 comments on commit 456bf3f

Please sign in to comment.