1 /** 2 * \file psa/crypto_legacy.h 3 * 4 * \brief Add temporary suppport for deprecated symbols before they are 5 * removed from the library. 6 * 7 * PSA_WANT_KEY_TYPE_xxx_KEY_PAIR and MBEDTLS_PSA_ACCEL_KEY_TYPE_xxx_KEY_PAIR 8 * symbols are deprecated. 9 * New symols add a suffix to that base name in order to clearly state what is 10 * the expected use for the key (use, import, export, generate, derive). 11 * Here we define some backward compatibility support for uses stil using 12 * the legacy symbols. 13 */ 14 /* 15 * Copyright The Mbed TLS Contributors 16 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 17 */ 18 19 #ifndef MBEDTLS_PSA_CRYPTO_LEGACY_H 20 #define MBEDTLS_PSA_CRYPTO_LEGACY_H 21 22 #if defined(PSA_WANT_KEY_TYPE_ECC_KEY_PAIR) //no-check-names 23 #if !defined(PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_BASIC) 24 #define PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_BASIC 1 25 #endif 26 #if !defined(PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_IMPORT) 27 #define PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_IMPORT 1 28 #endif 29 #if !defined(PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_EXPORT) 30 #define PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_EXPORT 1 31 #endif 32 #if !defined(PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_GENERATE) 33 #define PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_GENERATE 1 34 #endif 35 #if !defined(PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_DERIVE) 36 #define PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_DERIVE 1 37 #endif 38 #endif 39 40 #if defined(PSA_WANT_KEY_TYPE_RSA_KEY_PAIR) //no-check-names 41 #if !defined(PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_BASIC) 42 #define PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_BASIC 1 43 #endif 44 #if !defined(PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_IMPORT) 45 #define PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_IMPORT 1 46 #endif 47 #if !defined(PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_EXPORT) 48 #define PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_EXPORT 1 49 #endif 50 #if !defined(PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_GENERATE) 51 #define PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_GENERATE 1 52 #endif 53 #endif 54 55 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR) //no-check-names 56 #if !defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR_BASIC) 57 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR_BASIC 58 #endif 59 #if !defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR_IMPORT) 60 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR_IMPORT 61 #endif 62 #if !defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR_EXPORT) 63 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR_EXPORT 64 #endif 65 #if !defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR_GENERATE) 66 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR_GENERATE 67 #endif 68 #if !defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR_DERIVE) 69 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR_DERIVE 70 #endif 71 #endif 72 73 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR) //no-check-names 74 #if !defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR_BASIC) 75 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR_BASIC 76 #endif 77 #if !defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR_IMPORT) 78 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR_IMPORT 79 #endif 80 #if !defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR_EXPORT) 81 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR_EXPORT 82 #endif 83 #if !defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR_GENERATE) 84 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR_GENERATE 85 #endif 86 #endif 87 88 #endif /* MBEDTLS_PSA_CRYPTO_LEGACY_H */ 89