KMS: Add SM2DSA
signing algorithms (#6609)
This commit is contained in:
parent
29b66fe10c
commit
a35403714b
@ -180,6 +180,7 @@ class Key(CloudFormationModel):
|
|||||||
"RSASSA_PSS_SHA_256",
|
"RSASSA_PSS_SHA_256",
|
||||||
"RSASSA_PSS_SHA_384",
|
"RSASSA_PSS_SHA_384",
|
||||||
"RSASSA_PSS_SHA_512",
|
"RSASSA_PSS_SHA_512",
|
||||||
|
"SM2DSA",
|
||||||
]
|
]
|
||||||
|
|
||||||
def to_dict(self) -> Dict[str, Any]:
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
@ -86,6 +86,7 @@ def test_create_key():
|
|||||||
"RSASSA_PSS_SHA_256",
|
"RSASSA_PSS_SHA_256",
|
||||||
"RSASSA_PSS_SHA_384",
|
"RSASSA_PSS_SHA_384",
|
||||||
"RSASSA_PSS_SHA_512",
|
"RSASSA_PSS_SHA_512",
|
||||||
|
"SM2DSA",
|
||||||
]
|
]
|
||||||
|
|
||||||
key = conn.create_key(KeyUsage="SIGN_VERIFY", KeySpec="ECC_SECG_P256K1")
|
key = conn.create_key(KeyUsage="SIGN_VERIFY", KeySpec="ECC_SECG_P256K1")
|
||||||
@ -1107,7 +1108,7 @@ def test_sign_invalid_signing_algorithm():
|
|||||||
assert err["Code"] == "ValidationException"
|
assert err["Code"] == "ValidationException"
|
||||||
assert (
|
assert (
|
||||||
err["Message"]
|
err["Message"]
|
||||||
== "1 validation error detected: Value 'INVALID' at 'SigningAlgorithm' failed to satisfy constraint: Member must satisfy enum value set: ['RSASSA_PKCS1_V1_5_SHA_256', 'RSASSA_PKCS1_V1_5_SHA_384', 'RSASSA_PKCS1_V1_5_SHA_512', 'RSASSA_PSS_SHA_256', 'RSASSA_PSS_SHA_384', 'RSASSA_PSS_SHA_512']"
|
== "1 validation error detected: Value 'INVALID' at 'SigningAlgorithm' failed to satisfy constraint: Member must satisfy enum value set: ['RSASSA_PKCS1_V1_5_SHA_256', 'RSASSA_PKCS1_V1_5_SHA_384', 'RSASSA_PKCS1_V1_5_SHA_512', 'RSASSA_PSS_SHA_256', 'RSASSA_PSS_SHA_384', 'RSASSA_PSS_SHA_512', 'SM2DSA']"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -1282,7 +1283,7 @@ def test_verify_invalid_signing_algorithm():
|
|||||||
assert err["Code"] == "ValidationException"
|
assert err["Code"] == "ValidationException"
|
||||||
assert (
|
assert (
|
||||||
err["Message"]
|
err["Message"]
|
||||||
== "1 validation error detected: Value 'INVALID' at 'SigningAlgorithm' failed to satisfy constraint: Member must satisfy enum value set: ['RSASSA_PKCS1_V1_5_SHA_256', 'RSASSA_PKCS1_V1_5_SHA_384', 'RSASSA_PKCS1_V1_5_SHA_512', 'RSASSA_PSS_SHA_256', 'RSASSA_PSS_SHA_384', 'RSASSA_PSS_SHA_512']"
|
== "1 validation error detected: Value 'INVALID' at 'SigningAlgorithm' failed to satisfy constraint: Member must satisfy enum value set: ['RSASSA_PKCS1_V1_5_SHA_256', 'RSASSA_PKCS1_V1_5_SHA_384', 'RSASSA_PKCS1_V1_5_SHA_512', 'RSASSA_PSS_SHA_256', 'RSASSA_PSS_SHA_384', 'RSASSA_PSS_SHA_512', 'SM2DSA']"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user