mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
psa: Add backwards compatible error codes
Add deprecated error codes to help transition between the previous version of the PSA Crypto specification and the current one.
This commit is contained in:
@ -167,6 +167,16 @@ class MacroCollector:
|
||||
return
|
||||
elif (name.startswith('PSA_ERROR_') or name == 'PSA_SUCCESS') \
|
||||
and not parameter:
|
||||
if name in [
|
||||
'PSA_ERROR_UNKNOWN_ERROR',
|
||||
'PSA_ERROR_OCCUPIED_SLOT',
|
||||
'PSA_ERROR_EMPTY_SLOT',
|
||||
'PSA_ERROR_INSUFFICIENT_CAPACITY',
|
||||
]:
|
||||
# Ad hoc skipping of deprecated error codes, which share
|
||||
# numerical values with non-deprecated error codes
|
||||
return
|
||||
|
||||
self.statuses.add(name)
|
||||
elif name.startswith('PSA_KEY_TYPE_') and not parameter:
|
||||
self.key_types.add(name)
|
||||
|
Reference in New Issue
Block a user