2018-02-08 18:04:43 +00:00
|
|
|
/*
|
|
|
|
* Version information
|
|
|
|
*
|
2020-09-05 10:53:20 +00:00
|
|
|
* Copyright The Mbed TLS Contributors
|
2024-01-30 13:09:13 +00:00
|
|
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
2018-02-08 18:04:43 +00:00
|
|
|
*/
|
|
|
|
|
2021-12-21 11:54:05 +00:00
|
|
|
#include "common.h"
|
2018-02-08 18:04:43 +00:00
|
|
|
|
|
|
|
#if defined(MBEDTLS_VERSION_C)
|
|
|
|
|
|
|
|
#include "mbedtls/version.h"
|
|
|
|
#include <string.h>
|
|
|
|
|
2023-04-18 08:38:24 +00:00
|
|
|
unsigned int mbedtls_version_get_number(void)
|
2018-02-08 18:04:43 +00:00
|
|
|
{
|
2023-04-18 08:38:24 +00:00
|
|
|
return MBEDTLS_VERSION_NUMBER;
|
2018-02-08 18:04:43 +00:00
|
|
|
}
|
|
|
|
|
2023-04-18 08:38:24 +00:00
|
|
|
void mbedtls_version_get_string(char *string)
|
2018-02-08 18:04:43 +00:00
|
|
|
{
|
2023-04-18 08:38:24 +00:00
|
|
|
memcpy(string, MBEDTLS_VERSION_STRING,
|
|
|
|
sizeof(MBEDTLS_VERSION_STRING));
|
2018-02-08 18:04:43 +00:00
|
|
|
}
|
|
|
|
|
2023-04-18 08:38:24 +00:00
|
|
|
void mbedtls_version_get_string_full(char *string)
|
2018-02-08 18:04:43 +00:00
|
|
|
{
|
2023-04-18 08:38:24 +00:00
|
|
|
memcpy(string, MBEDTLS_VERSION_STRING_FULL,
|
|
|
|
sizeof(MBEDTLS_VERSION_STRING_FULL));
|
2018-02-08 18:04:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* MBEDTLS_VERSION_C */
|