• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Query Mbed TLS compile time configurations from config.h
3  *
4  *  Copyright The Mbed TLS Contributors
5  *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
6  */
7 
8 #ifndef MBEDTLS_PROGRAMS_TEST_QUERY_CONFIG_H
9 #define MBEDTLS_PROGRAMS_TEST_QUERY_CONFIG_H
10 
11 #if !defined(MBEDTLS_CONFIG_FILE)
12 #include "mbedtls/config.h"
13 #else
14 #include MBEDTLS_CONFIG_FILE
15 #endif
16 
17 /** Check whether a given configuration symbol is enabled.
18  *
19  * \param config    The symbol to query (e.g. "MBEDTLS_RSA_C").
20  * \return          \c 0 if the symbol was defined at compile time
21  *                  (in MBEDTLS_CONFIG_FILE or config.h),
22  *                  \c 1 otherwise.
23  *
24  * \note            This function is defined in `programs/test/query_config.c`
25  *                  which is automatically generated by
26  *                  `scripts/generate_query_config.pl`.
27  */
28 int query_config(const char *config);
29 
30 /** List all enabled configuration symbols
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 void list_config(void);
37 
38 #endif /* MBEDTLS_PROGRAMS_TEST_QUERY_CONFIG_H */
39