File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,29 @@ extern "C" {
37
37
/* UID for secure storage seed */
38
38
#define PSA_CRYPTO_ITS_RANDOM_SEED_UID 0xFFFFFF52
39
39
40
+ /*
41
+ * Deprecated PSA Crypto error code definitions
42
+ */
43
+ #if !defined(MBEDTLS_DEPRECATED_REMOVED )
44
+ #define PSA_ERROR_UNKNOWN_ERROR \
45
+ MBEDTLS_DEPRECATED_NUMERIC_CONSTANT( PSA_ERROR_GENERIC_ERROR )
46
+ #endif
47
+
48
+ #if !defined(MBEDTLS_DEPRECATED_REMOVED )
49
+ #define PSA_ERROR_OCCUPIED_SLOT \
50
+ MBEDTLS_DEPRECATED_NUMERIC_CONSTANT( PSA_ERROR_ALREADY_EXISTS )
51
+ #endif
52
+
53
+ #if !defined(MBEDTLS_DEPRECATED_REMOVED )
54
+ #define PSA_ERROR_EMPTY_SLOT \
55
+ MBEDTLS_DEPRECATED_NUMERIC_CONSTANT( PSA_ERROR_DOES_NOT_EXIST )
56
+ #endif
57
+
58
+ #if !defined(MBEDTLS_DEPRECATED_REMOVED )
59
+ #define PSA_ERROR_INSUFFICIENT_CAPACITY \
60
+ MBEDTLS_DEPRECATED_NUMERIC_CONSTANT( PSA_ERROR_INSUFFICIENT_DATA )
61
+ #endif
62
+
40
63
/**
41
64
* \brief Library deinitialization.
42
65
*
Original file line number Diff line number Diff line change @@ -167,6 +167,16 @@ def read_line(self, line):
167
167
return
168
168
elif (name .startswith ('PSA_ERROR_' ) or name == 'PSA_SUCCESS' ) \
169
169
and not parameter :
170
+ if name in [
171
+ 'PSA_ERROR_UNKNOWN_ERROR' ,
172
+ 'PSA_ERROR_OCCUPIED_SLOT' ,
173
+ 'PSA_ERROR_EMPTY_SLOT' ,
174
+ 'PSA_ERROR_INSUFFICIENT_CAPACITY'
175
+ ]:
176
+ # Ad hoc skipping of deprecated error codes, which share
177
+ # numerical values with non-deprecated error codes
178
+ return
179
+
170
180
self .statuses .add (name )
171
181
elif name .startswith ('PSA_KEY_TYPE_' ) and not parameter :
172
182
self .key_types .add (name )
You can’t perform that action at this time.
0 commit comments