1 /*
2  *  Version information
3  *
4  *  Copyright The Mbed TLS Contributors
5  *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
6  */
7 
8 #include "common.h"
9 
10 #if defined(MBEDTLS_VERSION_C)
11 
12 #include "mbedtls/version.h"
13 #include <string.h>
14 
mbedtls_version_get_number(void)15 unsigned int mbedtls_version_get_number(void)
16 {
17     return MBEDTLS_VERSION_NUMBER;
18 }
19 
mbedtls_version_get_string(char * string)20 void mbedtls_version_get_string(char *string)
21 {
22     memcpy(string, MBEDTLS_VERSION_STRING,
23            sizeof(MBEDTLS_VERSION_STRING));
24 }
25 
mbedtls_version_get_string_full(char * string)26 void mbedtls_version_get_string_full(char *string)
27 {
28     memcpy(string, MBEDTLS_VERSION_STRING_FULL,
29            sizeof(MBEDTLS_VERSION_STRING_FULL));
30 }
31 
32 #endif /* MBEDTLS_VERSION_C */
33