Move key type validation to crypto_knowledge

Signed-off-by: gabor-mezei-arm <gabor.mezei@arm.com>
This commit is contained in:
gabor-mezei-arm 2021-06-28 20:02:11 +02:00
parent 340fbf3735
commit 2784bfe226
No known key found for this signature in database
GPG key ID: 106F5A41ECC305BD
3 changed files with 24 additions and 19 deletions

View file

@ -107,14 +107,6 @@ class Key:
} #type: Dict[str, str]
"""Mapping of usage flags to the flags that they imply."""
IMPLICIT_USAGE_FLAGS_KEY_RESTRICTION = {
'PSA_KEY_USAGE_SIGN_HASH': '.*KEY_PAIR',
'PSA_KEY_USAGE_VERIFY_HASH': '.*KEY.*'
} #type: Dict[str, str]
"""Use a regexp to determine key types for which signature is possible
when using the actual usage flag.
"""
def __init__(self, *,
version: Optional[int] = None,
id: Optional[int] = None, #pylint: disable=redefined-builtin