mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-26 19:01:10 +00:00
Collect lifetime constructors
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
878140affb
commit
4c7da69c2b
|
@ -81,11 +81,15 @@ class PSAMacroEnumerator:
|
||||||
`self.arguments_for` for arguments that are not of a kind that is
|
`self.arguments_for` for arguments that are not of a kind that is
|
||||||
enumerated here.
|
enumerated here.
|
||||||
"""
|
"""
|
||||||
|
#pylint: disable=too-many-instance-attributes
|
||||||
|
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
"""Set up an empty set of known constructor macros.
|
"""Set up an empty set of known constructor macros.
|
||||||
"""
|
"""
|
||||||
self.statuses = set() #type: Set[str]
|
self.statuses = set() #type: Set[str]
|
||||||
|
self.lifetimes = set() #type: Set[str]
|
||||||
|
self.locations = set() #type: Set[str]
|
||||||
|
self.persistence_levels = set() #type: Set[str]
|
||||||
self.algorithms = set() #type: Set[str]
|
self.algorithms = set() #type: Set[str]
|
||||||
self.ecc_curves = set() #type: Set[str]
|
self.ecc_curves = set() #type: Set[str]
|
||||||
self.dh_groups = set() #type: Set[str]
|
self.dh_groups = set() #type: Set[str]
|
||||||
|
@ -132,6 +136,9 @@ class PSAMacroEnumerator:
|
||||||
self.arguments_for['aead_alg'] = sorted(self.aead_algorithms)
|
self.arguments_for['aead_alg'] = sorted(self.aead_algorithms)
|
||||||
self.arguments_for['curve'] = sorted(self.ecc_curves)
|
self.arguments_for['curve'] = sorted(self.ecc_curves)
|
||||||
self.arguments_for['group'] = sorted(self.dh_groups)
|
self.arguments_for['group'] = sorted(self.dh_groups)
|
||||||
|
self.arguments_for['persistence'] = sorted(self.persistence_levels)
|
||||||
|
self.arguments_for['location'] = sorted(self.locations)
|
||||||
|
self.arguments_for['lifetime'] = sorted(self.lifetimes)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _format_arguments(name: str, arguments: Iterable[str]) -> str:
|
def _format_arguments(name: str, arguments: Iterable[str]) -> str:
|
||||||
|
@ -340,6 +347,9 @@ enumerate
|
||||||
'ALG': self.algorithms,
|
'ALG': self.algorithms,
|
||||||
'ECC_CURVE': self.ecc_curves,
|
'ECC_CURVE': self.ecc_curves,
|
||||||
'DH_GROUP': self.dh_groups,
|
'DH_GROUP': self.dh_groups,
|
||||||
|
'KEY_LIFETIME': self.lifetimes,
|
||||||
|
'KEY_LOCATION': self.locations,
|
||||||
|
'KEY_PERSISTENCE': self.persistence_levels,
|
||||||
'KEY_TYPE': self.key_types,
|
'KEY_TYPE': self.key_types,
|
||||||
'KEY_USAGE': self.key_usage_flags,
|
'KEY_USAGE': self.key_usage_flags,
|
||||||
} #type: Dict[str, Set[str]]
|
} #type: Dict[str, Set[str]]
|
||||||
|
@ -365,7 +375,7 @@ enumerate
|
||||||
'asymmetric_signature_wildcard': [self.algorithms],
|
'asymmetric_signature_wildcard': [self.algorithms],
|
||||||
'asymmetric_encryption_algorithm': [],
|
'asymmetric_encryption_algorithm': [],
|
||||||
'other_algorithm': [],
|
'other_algorithm': [],
|
||||||
'lifetime': [],
|
'lifetime': [self.lifetimes],
|
||||||
} #type: Dict[str, List[Set[str]]]
|
} #type: Dict[str, List[Set[str]]]
|
||||||
self.arguments_for['mac_length'] += ['1', '63']
|
self.arguments_for['mac_length'] += ['1', '63']
|
||||||
self.arguments_for['min_mac_length'] += ['1', '63']
|
self.arguments_for['min_mac_length'] += ['1', '63']
|
||||||
|
|
Loading…
Reference in a new issue