1 /** 2 * \file psa/crypto_adjust_config_synonyms.h 3 * \brief Adjust PSA configuration: enable quasi-synonyms 4 * 5 * This is an internal header. Do not include it directly. 6 * 7 * When two features require almost the same code, we automatically enable 8 * both when either one is requested, to reduce the combinatorics of 9 * possible configurations. 10 */ 11 /* 12 * Copyright The Mbed TLS Contributors 13 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 14 */ 15 16 #ifndef PSA_CRYPTO_ADJUST_CONFIG_SYNONYMS_H 17 #define PSA_CRYPTO_ADJUST_CONFIG_SYNONYMS_H 18 19 #if !defined(MBEDTLS_CONFIG_FILES_READ) 20 #error "Do not include psa/crypto_adjust_*.h manually! This can lead to problems, " \ 21 "up to and including runtime errors such as buffer overflows. " \ 22 "If you're trying to fix a complaint from check_config.h, just remove " \ 23 "it from your configuration file: since Mbed TLS 3.0, it is included " \ 24 "automatically at the right point." 25 #endif /* */ 26 27 /****************************************************************/ 28 /* De facto synonyms */ 29 /****************************************************************/ 30 31 #if defined(PSA_WANT_ALG_ECDSA_ANY) && !defined(PSA_WANT_ALG_ECDSA) 32 #define PSA_WANT_ALG_ECDSA PSA_WANT_ALG_ECDSA_ANY 33 #elif !defined(PSA_WANT_ALG_ECDSA_ANY) && defined(PSA_WANT_ALG_ECDSA) 34 #define PSA_WANT_ALG_ECDSA_ANY PSA_WANT_ALG_ECDSA 35 #endif 36 37 #if defined(PSA_WANT_ALG_RSA_PKCS1V15_SIGN_RAW) && !defined(PSA_WANT_ALG_RSA_PKCS1V15_SIGN) 38 #define PSA_WANT_ALG_RSA_PKCS1V15_SIGN PSA_WANT_ALG_RSA_PKCS1V15_SIGN_RAW 39 #elif !defined(PSA_WANT_ALG_RSA_PKCS1V15_SIGN_RAW) && defined(PSA_WANT_ALG_RSA_PKCS1V15_SIGN) 40 #define PSA_WANT_ALG_RSA_PKCS1V15_SIGN_RAW PSA_WANT_ALG_RSA_PKCS1V15_SIGN 41 #endif 42 43 #if defined(PSA_WANT_ALG_RSA_PSS_ANY_SALT) && !defined(PSA_WANT_ALG_RSA_PSS) 44 #define PSA_WANT_ALG_RSA_PSS PSA_WANT_ALG_RSA_PSS_ANY_SALT 45 #elif !defined(PSA_WANT_ALG_RSA_PSS_ANY_SALT) && defined(PSA_WANT_ALG_RSA_PSS) 46 #define PSA_WANT_ALG_RSA_PSS_ANY_SALT PSA_WANT_ALG_RSA_PSS 47 #endif 48 49 #endif /* PSA_CRYPTO_ADJUST_CONFIG_SYNONYMS_H */ 50