Gilles Peskine | 7b7d903 | 2023-09-04 16:55:14 +0200 | [diff] [blame] | 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 |
| 12 | * |
| 13 | * Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 14 | * not use this file except in compliance with the License. |
| 15 | * You may obtain a copy of the License at |
| 16 | * |
| 17 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 18 | * |
| 19 | * Unless required by applicable law or agreed to in writing, software |
| 20 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 21 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 22 | * See the License for the specific language governing permissions and |
| 23 | * limitations under the License. |
| 24 | */ |
| 25 | |
| 26 | #ifndef PSA_CRYPTO_ADJUST_CONFIG_SYNONYMS_H |
| 27 | #define PSA_CRYPTO_ADJUST_CONFIG_SYNONYMS_H |
| 28 | |
| 29 | /****************************************************************/ |
| 30 | /* De facto synonyms */ |
| 31 | /****************************************************************/ |
| 32 | |
| 33 | #if defined(PSA_WANT_ALG_ECDSA_ANY) && !defined(PSA_WANT_ALG_ECDSA) |
| 34 | #define PSA_WANT_ALG_ECDSA PSA_WANT_ALG_ECDSA_ANY |
| 35 | #elif !defined(PSA_WANT_ALG_ECDSA_ANY) && defined(PSA_WANT_ALG_ECDSA) |
| 36 | #define PSA_WANT_ALG_ECDSA_ANY PSA_WANT_ALG_ECDSA |
| 37 | #endif |
| 38 | |
| 39 | #if defined(PSA_WANT_ALG_CCM_STAR_NO_TAG) && !defined(PSA_WANT_ALG_CCM) |
| 40 | #define PSA_WANT_ALG_CCM PSA_WANT_ALG_CCM_STAR_NO_TAG |
| 41 | #elif !defined(PSA_WANT_ALG_CCM_STAR_NO_TAG) && defined(PSA_WANT_ALG_CCM) |
| 42 | #define PSA_WANT_ALG_CCM_STAR_NO_TAG PSA_WANT_ALG_CCM |
| 43 | #endif |
| 44 | |
| 45 | #if defined(PSA_WANT_ALG_RSA_PKCS1V15_SIGN_RAW) && !defined(PSA_WANT_ALG_RSA_PKCS1V15_SIGN) |
| 46 | #define PSA_WANT_ALG_RSA_PKCS1V15_SIGN PSA_WANT_ALG_RSA_PKCS1V15_SIGN_RAW |
| 47 | #elif !defined(PSA_WANT_ALG_RSA_PKCS1V15_SIGN_RAW) && defined(PSA_WANT_ALG_RSA_PKCS1V15_SIGN) |
| 48 | #define PSA_WANT_ALG_RSA_PKCS1V15_SIGN_RAW PSA_WANT_ALG_RSA_PKCS1V15_SIGN |
| 49 | #endif |
| 50 | |
| 51 | #if defined(PSA_WANT_ALG_RSA_PSS_ANY_SALT) && !defined(PSA_WANT_ALG_RSA_PSS) |
| 52 | #define PSA_WANT_ALG_RSA_PSS PSA_WANT_ALG_RSA_PSS_ANY_SALT |
| 53 | #elif !defined(PSA_WANT_ALG_RSA_PSS_ANY_SALT) && defined(PSA_WANT_ALG_RSA_PSS) |
| 54 | #define PSA_WANT_ALG_RSA_PSS_ANY_SALT PSA_WANT_ALG_RSA_PSS |
| 55 | #endif |
| 56 | |
| 57 | #endif /* PSA_CRYPTO_ADJUST_CONFIG_SYNONYMS_H */ |