blob: 528e215031a61a9fe99534d7a534c9abd9cbe474 [file] [log] [blame]
John Durkop6e33dbe2020-09-17 21:15:13 -07001/**
2 * \file mbedtls/config_psa.h
3 * \brief PSA crypto configuration options (set of defines)
4 *
5 * This set of compile-time options may be used to enable
6 * or disable PSA crypto features selectively. This will aid
7 * in reducing the size of the library by removing unused code.
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 MBEDTLS_CONFIG_PSA_H
27#define MBEDTLS_CONFIG_PSA_H
28
29#include "psa/crypto_config.h"
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
John Durkop2dfaf9c2020-09-24 04:30:10 -070035#if defined(MBEDTLS_PSA_CRYPTO_CONFIG)
John Durkopd8959392020-09-20 23:09:17 -070036
John Durkop2dfaf9c2020-09-24 04:30:10 -070037#if defined(PSA_WANT_ALG_ECDSA)
38#if !defined(MBEDTLS_PSA_ACCEL_ALG_ECDSA)
John Durkopd8959392020-09-20 23:09:17 -070039#define MBEDTLS_PSA_BUILTIN_ALG_ECDSA
John Durkop2dfaf9c2020-09-24 04:30:10 -070040#else /* !defined(MBEDTLS_PSA_ACCEL_ALG_ECDSA) */
John Durkopd8959392020-09-20 23:09:17 -070041#define MBEDTLS_ECDSA_C
John Durkop2dfaf9c2020-09-24 04:30:10 -070042#endif /* !defined(MBEDTLS_PSA_ACCEL_ALG_ECDSA) */
43#endif /* defined(PSA_WANT_ALG_ECDSA) */
John Durkopd8959392020-09-20 23:09:17 -070044
John Durkop2dfaf9c2020-09-24 04:30:10 -070045#if defined(PSA_WANT_ALG_DETERMINISTIC_ECDSA)
46#if !defined(MBEDTLS_PSA_ACCEL_ALG_ECDSA_DETERMINISTIC)
John Durkopd8959392020-09-20 23:09:17 -070047#define MBEDTLS_PSA_BUILTIN_ALG_DETERMINISTIC_ECDSA
John Durkop2dfaf9c2020-09-24 04:30:10 -070048#else /* && !defined(MBEDTLS_PSA_ACCEL_ALG_ECDSA_DETERMINISTIC) */
John Durkopd8959392020-09-20 23:09:17 -070049#define MBEDTLS_ECDSA_DETERMINISTIC
John Durkop2dfaf9c2020-09-24 04:30:10 -070050#endif /* !defined(MBEDTLS_PSA_ACCEL_ALG_ECDSA_DETERMINISTIC) */
51#endif /* defined(PSA_WANT_ALG_DETERMINISTIC_ECDSA) */
52
53#endif /* MBEDTLS_PSA_CRYPTO_CONFIG */
John Durkopd8959392020-09-20 23:09:17 -070054
John Durkop6e33dbe2020-09-17 21:15:13 -070055#ifdef __cplusplus
56}
57#endif
58
59#endif /* MBEDTLS_CONFIG_PSA_H */