Path: blob/master/thirdparty/mbedtls/include/psa/crypto_adjust_config_dependencies.h
9904 views
/**1* \file psa/crypto_adjust_config_dependencies.h2* \brief Adjust PSA configuration by resolving some dependencies.3*4* This is an internal header. Do not include it directly.5*6* See docs/proposed/psa-conditional-inclusion-c.md.7* If the Mbed TLS implementation of a cryptographic mechanism A depends on a8* cryptographic mechanism B then if the cryptographic mechanism A is enabled9* and not accelerated enable B. Note that if A is enabled and accelerated, it10* is not necessary to enable B for A support.11*/12/*13* Copyright The Mbed TLS Contributors14* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later15*/1617#ifndef PSA_CRYPTO_ADJUST_CONFIG_DEPENDENCIES_H18#define PSA_CRYPTO_ADJUST_CONFIG_DEPENDENCIES_H1920#if !defined(MBEDTLS_CONFIG_FILES_READ)21#error "Do not include psa/crypto_adjust_*.h manually! This can lead to problems, " \22"up to and including runtime errors such as buffer overflows. " \23"If you're trying to fix a complaint from check_config.h, just remove " \24"it from your configuration file: since Mbed TLS 3.0, it is included " \25"automatically at the right point."26#endif /* */2728#if (defined(PSA_WANT_ALG_TLS12_PRF) && \29!defined(MBEDTLS_PSA_ACCEL_ALG_TLS12_PRF)) || \30(defined(PSA_WANT_ALG_TLS12_PSK_TO_MS) && \31!defined(MBEDTLS_PSA_ACCEL_ALG_TLS12_PSK_TO_MS)) || \32(defined(PSA_WANT_ALG_HKDF) && \33!defined(MBEDTLS_PSA_ACCEL_ALG_HKDF)) || \34(defined(PSA_WANT_ALG_HKDF_EXTRACT) && \35!defined(MBEDTLS_PSA_ACCEL_ALG_HKDF_EXTRACT)) || \36(defined(PSA_WANT_ALG_HKDF_EXPAND) && \37!defined(MBEDTLS_PSA_ACCEL_ALG_HKDF_EXPAND)) || \38(defined(PSA_WANT_ALG_PBKDF2_HMAC) && \39!defined(MBEDTLS_PSA_ACCEL_ALG_PBKDF2_HMAC))40#define PSA_WANT_ALG_HMAC 141#define PSA_WANT_KEY_TYPE_HMAC 142#endif4344#if (defined(PSA_WANT_ALG_PBKDF2_AES_CMAC_PRF_128) && \45!defined(MBEDTLS_PSA_ACCEL_ALG_PBKDF2_AES_CMAC_PRF_128))46#define PSA_WANT_KEY_TYPE_AES 147#define PSA_WANT_ALG_CMAC 148#endif4950#endif /* PSA_CRYPTO_ADJUST_CONFIG_DEPENDENCIES_H */515253