Skip to content

Commit

Permalink
removes faulty checks that raise error when local_scheme not passed.
Browse files Browse the repository at this point in the history
  • Loading branch information
ianhundere committed Mar 22, 2024
1 parent 612ce9e commit 62ea6a8
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions securesystemslib/signer/_aws_signer.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,21 +147,6 @@ def import_(
else:
raise ValueError(f"Unsupported key type: {keytype}")

if keytype == "ecdsa" and local_scheme != cls._get_ecdsa_scheme(
aws_scheme
):
raise ValueError(
f"The AWS KMS key does not support the scheme: {local_scheme}"
)

if (
keytype == "rsa"
and local_scheme not in cls.aws_signing_algorithms.values()
):
raise ValueError(
f"The AWS KMS key does not support the scheme: {local_scheme}"
)

kms_pubkey = serialization.load_der_public_key(request["PublicKey"])

public_key_pem = kms_pubkey.public_bytes(
Expand Down

0 comments on commit 62ea6a8

Please sign in to comment.