Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-08-27 09:43:22

0001 /**
0002  * \file psa/crypto_adjust_config_synonyms.h
0003  * \brief Adjust PSA configuration: enable quasi-synonyms
0004  *
0005  * This is an internal header. Do not include it directly.
0006  *
0007  * When two features require almost the same code, we automatically enable
0008  * both when either one is requested, to reduce the combinatorics of
0009  * possible configurations.
0010  */
0011 /*
0012  *  Copyright The Mbed TLS Contributors
0013  *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
0014  */
0015 
0016 #ifndef PSA_CRYPTO_ADJUST_CONFIG_SYNONYMS_H
0017 #define PSA_CRYPTO_ADJUST_CONFIG_SYNONYMS_H
0018 
0019 #if !defined(MBEDTLS_CONFIG_FILES_READ)
0020 #error "Do not include psa/crypto_adjust_*.h manually! This can lead to problems, " \
0021     "up to and including runtime errors such as buffer overflows. " \
0022     "If you're trying to fix a complaint from check_config.h, just remove " \
0023     "it from your configuration file: since Mbed TLS 3.0, it is included " \
0024     "automatically at the right point."
0025 #endif /* */
0026 
0027 /****************************************************************/
0028 /* De facto synonyms */
0029 /****************************************************************/
0030 
0031 #if defined(PSA_WANT_ALG_ECDSA_ANY) && !defined(PSA_WANT_ALG_ECDSA)
0032 #define PSA_WANT_ALG_ECDSA PSA_WANT_ALG_ECDSA_ANY
0033 #elif !defined(PSA_WANT_ALG_ECDSA_ANY) && defined(PSA_WANT_ALG_ECDSA)
0034 #define PSA_WANT_ALG_ECDSA_ANY PSA_WANT_ALG_ECDSA
0035 #endif
0036 
0037 #if defined(PSA_WANT_ALG_RSA_PKCS1V15_SIGN_RAW) && !defined(PSA_WANT_ALG_RSA_PKCS1V15_SIGN)
0038 #define PSA_WANT_ALG_RSA_PKCS1V15_SIGN PSA_WANT_ALG_RSA_PKCS1V15_SIGN_RAW
0039 #elif !defined(PSA_WANT_ALG_RSA_PKCS1V15_SIGN_RAW) && defined(PSA_WANT_ALG_RSA_PKCS1V15_SIGN)
0040 #define PSA_WANT_ALG_RSA_PKCS1V15_SIGN_RAW PSA_WANT_ALG_RSA_PKCS1V15_SIGN
0041 #endif
0042 
0043 #if defined(PSA_WANT_ALG_RSA_PSS_ANY_SALT) && !defined(PSA_WANT_ALG_RSA_PSS)
0044 #define PSA_WANT_ALG_RSA_PSS PSA_WANT_ALG_RSA_PSS_ANY_SALT
0045 #elif !defined(PSA_WANT_ALG_RSA_PSS_ANY_SALT) && defined(PSA_WANT_ALG_RSA_PSS)
0046 #define PSA_WANT_ALG_RSA_PSS_ANY_SALT PSA_WANT_ALG_RSA_PSS
0047 #endif
0048 
0049 #endif /* PSA_CRYPTO_ADJUST_CONFIG_SYNONYMS_H */