2022-03-15 13:29:32 +01:00
|
|
|
/*
|
|
|
|
* Version information
|
|
|
|
*
|
|
|
|
* Copyright The Mbed TLS Contributors
|
2024-02-08 17:41:31 +01:00
|
|
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
2022-03-15 13:29:32 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "common.h"
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_VERSION_C)
|
|
|
|
|
|
|
|
#include "mbedtls/version.h"
|
|
|
|
#include <string.h>
|
|
|
|
|
2023-08-30 11:18:00 +02:00
|
|
|
unsigned int mbedtls_version_get_number(void)
|
2022-03-15 13:29:32 +01:00
|
|
|
{
|
2023-08-30 11:18:00 +02:00
|
|
|
return MBEDTLS_VERSION_NUMBER;
|
2022-03-15 13:29:32 +01:00
|
|
|
}
|
|
|
|
|
2023-08-30 11:18:00 +02:00
|
|
|
void mbedtls_version_get_string(char *string)
|
2022-03-15 13:29:32 +01:00
|
|
|
{
|
2023-08-30 11:18:00 +02:00
|
|
|
memcpy(string, MBEDTLS_VERSION_STRING,
|
|
|
|
sizeof(MBEDTLS_VERSION_STRING));
|
2022-03-15 13:29:32 +01:00
|
|
|
}
|
|
|
|
|
2023-08-30 11:18:00 +02:00
|
|
|
void mbedtls_version_get_string_full(char *string)
|
2022-03-15 13:29:32 +01:00
|
|
|
{
|
2023-08-30 11:18:00 +02:00
|
|
|
memcpy(string, MBEDTLS_VERSION_STRING_FULL,
|
|
|
|
sizeof(MBEDTLS_VERSION_STRING_FULL));
|
2022-03-15 13:29:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* MBEDTLS_VERSION_C */
|