Skip to content

Commit 6394e3e

Browse files
Review changes
1 parent dee9a83 commit 6394e3e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

securesystemslib/signer/_aws_signer.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ class AWSSigner(Signer):
3333
AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_SESSION_TOKEN. These will
3434
be recognized by the boto3 SDK, which underlies the aws_kms Python module.
3535
36-
The signer computes hash digests locally and sends only the digest to AWS KMS,
37-
removing the 4KB message size limitation that exists with raw message signing.
36+
The signer computes hash digests locally and sends only the digest to AWS KMS.
3837
3938
For more details on AWS authentication, refer to the AWS Command Line
4039
Interface User Guide:
@@ -192,8 +191,7 @@ def sign(self, payload: bytes) -> Signature:
192191
"""Sign the payload with the AWS KMS key
193192
194193
This method computes the hash of the payload locally and sends only the
195-
digest to AWS KMS for signing, removing the 4KB message size limitation
196-
that exists when using MessageType="RAW".
194+
digest to AWS KMS for signing.
197195
198196
Arguments:
199197
payload (bytes): The payload to be signed.
@@ -205,7 +203,6 @@ def sign(self, payload: bytes) -> Signature:
205203
Signature: A signature object containing the key ID and the signature.
206204
"""
207205
try:
208-
# Compute hash locally to remove 4KB payload size limit
209206
hash_algorithm = self.public_key.get_hash_algorithm_name()
210207
hasher = hashlib.new(hash_algorithm)
211208
hasher.update(payload)

0 commit comments

Comments
 (0)