Skip to content

Commit

Permalink
GCPSigner: Use "ecdsa" as keytype
Browse files Browse the repository at this point in the history
The more specific keytypes may get deprecated at some point.
  • Loading branch information
jku committed Jan 11, 2023
1 parent b220c42 commit 8f85dc8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions securesystemslib/signer/_gcp_signer.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ def _get_keytype_and_scheme(algorithm: int) -> Tuple[str, str]:
"""Return keytype and scheme for the KMS algorithm enum"""
keytypes_and_schemes = {
CryptoKeyVersion.CryptoKeyVersionAlgorithm.EC_SIGN_P256_SHA256: (
"ecdsa-sha2-nistp256",
"ecdsa",
"ecdsa-sha2-nistp256",
),
CryptoKeyVersion.CryptoKeyVersionAlgorithm.EC_SIGN_P384_SHA384: (
"ecdsa-sha2-nistp384",
"ecdsa",
"ecdsa-sha2-nistp384",
),
CryptoKeyVersion.CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_2048_SHA256: (
Expand Down
2 changes: 1 addition & 1 deletion tests/check_kms_signers.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class TestKMSKeys(unittest.TestCase):
pubkey = Key.from_dict(
"23b650fcc538c0c6d423d0886448172fd51d81f43ef749851a0a84978cdcd8e0",
{
"keytype": "ecdsa-sha2-nistp256",
"keytype": "ecdsa",
"scheme": "ecdsa-sha2-nistp256",
"keyval": {
"public": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE/ptvrXYuUc2ZaKssHhtg/IKNbO1X\ncDWlbKqLNpaK62MKdOwDz1qlp5AGHZkTY9tO09iq1F16SvVot1BQ9FJ2dw==\n-----END PUBLIC KEY-----\n"
Expand Down

0 comments on commit 8f85dc8

Please sign in to comment.