Skip to content

Commit 6c3e632

Browse files
Add backward compatibility alias for PSA_ERROR_CORRUPTION_DETECTED
This was renamed from PSA_ERROR_TAMPERING_DETECTED. Add a backward compatibility alias in case somebody was already using it.
1 parent 34247d9 commit 6c3e632

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

include/psa/crypto_extra.h

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,14 @@ extern "C" {
4545
#if !defined(MBEDTLS_DEPRECATED_REMOVED)
4646
#define PSA_ERROR_UNKNOWN_ERROR \
4747
MBEDTLS_DEPRECATED_NUMERIC_CONSTANT( PSA_ERROR_GENERIC_ERROR )
48-
#endif
49-
50-
#if !defined(MBEDTLS_DEPRECATED_REMOVED)
5148
#define PSA_ERROR_OCCUPIED_SLOT \
5249
MBEDTLS_DEPRECATED_NUMERIC_CONSTANT( PSA_ERROR_ALREADY_EXISTS )
53-
#endif
54-
55-
#if !defined(MBEDTLS_DEPRECATED_REMOVED)
5650
#define PSA_ERROR_EMPTY_SLOT \
5751
MBEDTLS_DEPRECATED_NUMERIC_CONSTANT( PSA_ERROR_DOES_NOT_EXIST )
58-
#endif
59-
60-
#if !defined(MBEDTLS_DEPRECATED_REMOVED)
6152
#define PSA_ERROR_INSUFFICIENT_CAPACITY \
6253
MBEDTLS_DEPRECATED_NUMERIC_CONSTANT( PSA_ERROR_INSUFFICIENT_DATA )
54+
#define PSA_ERROR_TAMPERING_DETECTED \
55+
MBEDTLS_DEPRECATED_NUMERIC_CONSTANT( PSA_ERROR_CORRUPTION_DETECTED )
6356
#endif
6457

6558
/** \addtogroup attributes

tests/scripts/test_psa_constant_names.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ def _argument_split(cls, arguments):
176176
'PSA_ERROR_OCCUPIED_SLOT',
177177
'PSA_ERROR_EMPTY_SLOT',
178178
'PSA_ERROR_INSUFFICIENT_CAPACITY',
179+
'PSA_ERROR_TAMPERING_DETECTED',
179180
])
180181
def parse_header_line(self, line):
181182
"""Parse a C header line, looking for "#define PSA_xxx"."""

0 commit comments

Comments
 (0)