Gilles Peskine | c772b18 | 2021-01-12 15:55:10 +0100 | [diff] [blame] | 1 | /* |
Bence Szépkúti | bb0cfeb | 2021-05-28 09:42:25 +0200 | [diff] [blame] | 2 | * Query Mbed TLS compile time configurations from mbedtls_config.h |
Gilles Peskine | c772b18 | 2021-01-12 15:55:10 +0100 | [diff] [blame] | 3 | * |
| 4 | * Copyright The Mbed TLS Contributors |
| 5 | * SPDX-License-Identifier: Apache-2.0 |
| 6 | * |
| 7 | * Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 8 | * not use this file except in compliance with the License. |
| 9 | * You may obtain a copy of the License at |
| 10 | * |
| 11 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | * |
| 13 | * Unless required by applicable law or agreed to in writing, software |
| 14 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 15 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | * See the License for the specific language governing permissions and |
| 17 | * limitations under the License. |
| 18 | */ |
| 19 | |
| 20 | #ifndef MBEDTLS_PROGRAMS_TEST_QUERY_CONFIG_H |
| 21 | #define MBEDTLS_PROGRAMS_TEST_QUERY_CONFIG_H |
| 22 | |
Bence Szépkúti | c662b36 | 2021-05-27 11:25:03 +0200 | [diff] [blame] | 23 | #include "mbedtls/build_info.h" |
Gilles Peskine | c772b18 | 2021-01-12 15:55:10 +0100 | [diff] [blame] | 24 | |
| 25 | /** Check whether a given configuration symbol is enabled. |
| 26 | * |
| 27 | * \param config The symbol to query (e.g. "MBEDTLS_RSA_C"). |
| 28 | * \return \c 0 if the symbol was defined at compile time |
Bence Szépkúti | bb0cfeb | 2021-05-28 09:42:25 +0200 | [diff] [blame] | 29 | * (in MBEDTLS_CONFIG_FILE or mbedtls_config.h), |
Gilles Peskine | c772b18 | 2021-01-12 15:55:10 +0100 | [diff] [blame] | 30 | * \c 1 otherwise. |
| 31 | * |
| 32 | * \note This function is defined in `programs/test/query_config.c` |
| 33 | * which is automatically generated by |
| 34 | * `scripts/generate_query_config.pl`. |
| 35 | */ |
| 36 | int query_config( const char *config ); |
| 37 | |
Jerry Yu | 84e63a7 | 2021-12-06 13:40:37 +0800 | [diff] [blame] | 38 | /** List all enabled configuration symbols |
| 39 | * |
| 40 | * \note This function is defined in `programs/test/query_config.c` |
| 41 | * which is automatically generated by |
| 42 | * `scripts/generate_query_config.pl`. |
| 43 | */ |
| 44 | void list_config( void ); |
| 45 | |
Gilles Peskine | c772b18 | 2021-01-12 15:55:10 +0100 | [diff] [blame] | 46 | #endif /* MBEDTLS_PROGRAMS_TEST_QUERY_CONFIG_H */ |