Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-08-27 09:37:34

0001 /**
0002  * \file version.h
0003  *
0004  * \brief Run-time version information
0005  */
0006 /*
0007  *  Copyright The Mbed TLS Contributors
0008  *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
0009  */
0010 /*
0011  * This set of run-time variables can be used to determine the version number of
0012  * the Mbed TLS library used. Compile-time version defines for the same can be
0013  * found in build_info.h
0014  */
0015 #ifndef MBEDTLS_VERSION_H
0016 #define MBEDTLS_VERSION_H
0017 
0018 #include "mbedtls/build_info.h"
0019 
0020 #if defined(MBEDTLS_VERSION_C)
0021 
0022 #ifdef __cplusplus
0023 extern "C" {
0024 #endif
0025 
0026 /**
0027  * Get the version number.
0028  *
0029  * \return          The constructed version number in the format
0030  *                  MMNNPP00 (Major, Minor, Patch).
0031  */
0032 unsigned int mbedtls_version_get_number(void);
0033 
0034 /**
0035  * Get the version string ("x.y.z").
0036  *
0037  * \param string    The string that will receive the value.
0038  *                  (Should be at least 9 bytes in size)
0039  */
0040 void mbedtls_version_get_string(char *string);
0041 
0042 /**
0043  * Get the full version string ("Mbed TLS x.y.z").
0044  *
0045  * \param string    The string that will receive the value. The Mbed TLS version
0046  *                  string will use 18 bytes AT MOST including a terminating
0047  *                  null byte.
0048  *                  (So the buffer should be at least 18 bytes to receive this
0049  *                  version string).
0050  */
0051 void mbedtls_version_get_string_full(char *string);
0052 
0053 /**
0054  * \brief           Check if support for a feature was compiled into this
0055  *                  Mbed TLS binary. This allows you to see at runtime if the
0056  *                  library was for instance compiled with or without
0057  *                  Multi-threading support.
0058  *
0059  * \note            only checks against defines in the sections "System
0060  *                  support", "Mbed TLS modules" and "Mbed TLS feature
0061  *                  support" in mbedtls_config.h
0062  *
0063  * \param feature   The string for the define to check (e.g. "MBEDTLS_AES_C")
0064  *
0065  * \return          0 if the feature is present,
0066  *                  -1 if the feature is not present and
0067  *                  -2 if support for feature checking as a whole was not
0068  *                  compiled in.
0069  */
0070 int mbedtls_version_check_feature(const char *feature);
0071 
0072 #ifdef __cplusplus
0073 }
0074 #endif
0075 
0076 #endif /* MBEDTLS_VERSION_C */
0077 
0078 #endif /* version.h */