3
3
*
4
4
* \brief PSA cryptography module: Backward compatibility aliases
5
5
*
6
+ * This header declares alternative names for macro and functions.
7
+ * New application code should not use these names.
8
+ * These names may be removed in a future version of Mbed Crypto.
9
+ *
6
10
* \note This file may not be included directly. Applications must
7
11
* include psa/crypto.h.
8
12
*/
@@ -34,6 +38,9 @@ extern "C" {
34
38
35
39
#if !defined(MBEDTLS_DEPRECATED_REMOVED )
36
40
41
+ /*
42
+ * Mechanism for declaring deprecated values
43
+ */
37
44
#if defined(MBEDTLS_DEPRECATED_WARNING ) && !defined(MBEDTLS_PSA_DEPRECATED )
38
45
#define MBEDTLS_PSA_DEPRECATED __attribute__((deprecated))
39
46
#else
@@ -48,7 +55,7 @@ typedef MBEDTLS_PSA_DEPRECATED psa_key_usage_t mbedtls_deprecated_psa_key_usage_
48
55
( (mbedtls_deprecated_##type) ( value ) )
49
56
50
57
/*
51
- * Deprecated PSA Crypto error code definitions
58
+ * Deprecated PSA Crypto error code definitions (PSA Crypto API <= 1.0 beta2)
52
59
*/
53
60
#define PSA_ERROR_UNKNOWN_ERROR \
54
61
MBEDTLS_DEPRECATED_CONSTANT( psa_status_t, PSA_ERROR_GENERIC_ERROR )
@@ -62,23 +69,23 @@ typedef MBEDTLS_PSA_DEPRECATED psa_key_usage_t mbedtls_deprecated_psa_key_usage_
62
69
MBEDTLS_DEPRECATED_CONSTANT( psa_status_t, PSA_ERROR_CORRUPTION_DETECTED )
63
70
64
71
/*
65
- * Deprecated PSA Crypto numerical encodings
72
+ * Deprecated PSA Crypto numerical encodings (PSA Crypto API <= 1.0 beta3)
66
73
*/
67
74
#define PSA_KEY_USAGE_SIGN \
68
75
MBEDTLS_DEPRECATED_CONSTANT( psa_key_usage_t, PSA_KEY_USAGE_SIGN_HASH )
69
76
#define PSA_KEY_USAGE_VERIFY \
70
77
MBEDTLS_DEPRECATED_CONSTANT( psa_key_usage_t, PSA_KEY_USAGE_VERIFY_HASH )
71
78
72
79
/*
73
- * Deprecated PSA Crypto size calculation macros
80
+ * Deprecated PSA Crypto size calculation macros (PSA Crypto API <= 1.0 beta3)
74
81
*/
75
82
#define PSA_ASYMMETRIC_SIGNATURE_MAX_SIZE \
76
83
MBEDTLS_DEPRECATED_CONSTANT( size_t, PSA_SIGNATURE_MAX_SIZE )
77
84
#define PSA_ASYMMETRIC_SIGN_OUTPUT_SIZE ( key_type , key_bits , alg ) \
78
85
MBEDTLS_DEPRECATED_CONSTANT( size_t, PSA_SIGN_OUTPUT_SIZE( key_type, key_bits, alg ) )
79
86
80
87
/*
81
- * Deprecated PSA Crypto function names
88
+ * Deprecated PSA Crypto function names (PSA Crypto API <= 1.0 beta3)
82
89
*/
83
90
/* Make these macros and not wrappers so that there is no cost to
84
91
* applications that don't use the deprecated names.
0 commit comments