1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-08 17:42:09 +03:00

Move backward compatibility aliases to their own header

Move backward compatibility aliases to a separate header. Reserve
crypto_extra.h for implementation-specific extensions that we intend
to keep supporting.

This is better documentation for users. New users should simply ignore
backward compatibility aliases, and old users can look at
crypto_compat.h to see what is deprecated without bothering about new
features appearing in crypto_extra.h.

This facilitates maintenance because scripts such as
generate_psa_constants that want to ignore backward compability
aliases can simply exclude crypto_compat.h from their parsing.
This commit is contained in:
Gilles Peskine
2019-11-26 16:06:46 +01:00
parent 4eca19bbd6
commit 7a894f2142
4 changed files with 60 additions and 21 deletions

View File

@@ -206,12 +206,6 @@ class Inputs:
# Auxiliary macro whose name doesn't fit the usual patterns for
# auxiliary macros.
'PSA_ALG_AEAD_WITH_DEFAULT_TAG_LENGTH_CASE',
# Deprecated aliases.
'PSA_ERROR_UNKNOWN_ERROR',
'PSA_ERROR_OCCUPIED_SLOT',
'PSA_ERROR_EMPTY_SLOT',
'PSA_ERROR_INSUFFICIENT_CAPACITY',
'PSA_ERROR_TAMPERING_DETECTED',
])
def parse_header_line(self, line):
"""Parse a C header line, looking for "#define PSA_xxx"."""