query_config.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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
  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. #ifndef MBEDTLS_PROGRAMS_TEST_QUERY_CONFIG_H
  20. #define MBEDTLS_PROGRAMS_TEST_QUERY_CONFIG_H
  21. #if !defined(MBEDTLS_CONFIG_FILE)
  22. #include "mbedtls/config.h"
  23. #else
  24. #include MBEDTLS_CONFIG_FILE
  25. #endif
  26. /** Check whether a given configuration symbol is enabled.
  27. *
  28. * \param config The symbol to query (e.g. "MBEDTLS_RSA_C").
  29. * \return \c 0 if the symbol was defined at compile time
  30. * (in MBEDTLS_CONFIG_FILE or config.h),
  31. * \c 1 otherwise.
  32. *
  33. * \note This function is defined in `programs/test/query_config.c`
  34. * which is automatically generated by
  35. * `scripts/generate_query_config.pl`.
  36. */
  37. int query_config( const char *config );
  38. #endif /* MBEDTLS_PROGRAMS_TEST_QUERY_CONFIG_H */