1 /**
2  * \file psa/crypto_adjust_config_synonyms.h
3  * \brief Adjust PSA configuration: enable quasi-synonyms
4  *
5  * When two features require almost the same code, we automatically enable
6  * both when either one is requested, to reduce the combinatorics of
7  * possible configurations.
8  */
9 /*
10  *  Copyright The Mbed TLS Contributors
11  *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
12  */
13 
14 #ifndef PSA_CRYPTO_ADJUST_CONFIG_SYNONYMS_H
15 #define PSA_CRYPTO_ADJUST_CONFIG_SYNONYMS_H
16 
17 /****************************************************************/
18 /* De facto synonyms */
19 /****************************************************************/
20 
21 #if defined(PSA_WANT_ALG_ECDSA_ANY) && !defined(PSA_WANT_ALG_ECDSA)
22 #define PSA_WANT_ALG_ECDSA PSA_WANT_ALG_ECDSA_ANY
23 #elif !defined(PSA_WANT_ALG_ECDSA_ANY) && defined(PSA_WANT_ALG_ECDSA)
24 #define PSA_WANT_ALG_ECDSA_ANY PSA_WANT_ALG_ECDSA
25 #endif
26 
27 #if defined(PSA_WANT_ALG_CCM_STAR_NO_TAG) && !defined(PSA_WANT_ALG_CCM)
28 #define PSA_WANT_ALG_CCM PSA_WANT_ALG_CCM_STAR_NO_TAG
29 #elif !defined(PSA_WANT_ALG_CCM_STAR_NO_TAG) && defined(PSA_WANT_ALG_CCM)
30 #define PSA_WANT_ALG_CCM_STAR_NO_TAG PSA_WANT_ALG_CCM
31 #endif
32 
33 #if defined(PSA_WANT_ALG_RSA_PKCS1V15_SIGN_RAW) && !defined(PSA_WANT_ALG_RSA_PKCS1V15_SIGN)
34 #define PSA_WANT_ALG_RSA_PKCS1V15_SIGN PSA_WANT_ALG_RSA_PKCS1V15_SIGN_RAW
35 #elif !defined(PSA_WANT_ALG_RSA_PKCS1V15_SIGN_RAW) && defined(PSA_WANT_ALG_RSA_PKCS1V15_SIGN)
36 #define PSA_WANT_ALG_RSA_PKCS1V15_SIGN_RAW PSA_WANT_ALG_RSA_PKCS1V15_SIGN
37 #endif
38 
39 #if defined(PSA_WANT_ALG_RSA_PSS_ANY_SALT) && !defined(PSA_WANT_ALG_RSA_PSS)
40 #define PSA_WANT_ALG_RSA_PSS PSA_WANT_ALG_RSA_PSS_ANY_SALT
41 #elif !defined(PSA_WANT_ALG_RSA_PSS_ANY_SALT) && defined(PSA_WANT_ALG_RSA_PSS)
42 #define PSA_WANT_ALG_RSA_PSS_ANY_SALT PSA_WANT_ALG_RSA_PSS
43 #endif
44 
45 #endif /* PSA_CRYPTO_ADJUST_CONFIG_SYNONYMS_H */
46