1817466cbSJens Wiklander /* 2817466cbSJens Wiklander * Version information 3817466cbSJens Wiklander * 47901324dSJerome Forissier * Copyright The Mbed TLS Contributors 57901324dSJerome Forissier * SPDX-License-Identifier: Apache-2.0 6817466cbSJens Wiklander * 7817466cbSJens Wiklander * Licensed under the Apache License, Version 2.0 (the "License"); you may 8817466cbSJens Wiklander * not use this file except in compliance with the License. 9817466cbSJens Wiklander * You may obtain a copy of the License at 10817466cbSJens Wiklander * 11817466cbSJens Wiklander * http://www.apache.org/licenses/LICENSE-2.0 12817466cbSJens Wiklander * 13817466cbSJens Wiklander * Unless required by applicable law or agreed to in writing, software 14817466cbSJens Wiklander * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 15817466cbSJens Wiklander * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16817466cbSJens Wiklander * See the License for the specific language governing permissions and 17817466cbSJens Wiklander * limitations under the License. 18817466cbSJens Wiklander */ 19817466cbSJens Wiklander 207901324dSJerome Forissier #include "common.h" 21817466cbSJens Wiklander 22817466cbSJens Wiklander #if defined(MBEDTLS_VERSION_C) 23817466cbSJens Wiklander 24817466cbSJens Wiklander #include "mbedtls/version.h" 25817466cbSJens Wiklander #include <string.h> 26817466cbSJens Wiklander 273d3b0591SJens Wiklander unsigned int mbedtls_version_get_number(void) 28817466cbSJens Wiklander { 29*32b31808SJens Wiklander return MBEDTLS_VERSION_NUMBER; 30817466cbSJens Wiklander } 31817466cbSJens Wiklander 32817466cbSJens Wiklander void mbedtls_version_get_string(char *string) 33817466cbSJens Wiklander { 34817466cbSJens Wiklander memcpy(string, MBEDTLS_VERSION_STRING, 35817466cbSJens Wiklander sizeof(MBEDTLS_VERSION_STRING)); 36817466cbSJens Wiklander } 37817466cbSJens Wiklander 38817466cbSJens Wiklander void mbedtls_version_get_string_full(char *string) 39817466cbSJens Wiklander { 40817466cbSJens Wiklander memcpy(string, MBEDTLS_VERSION_STRING_FULL, 41817466cbSJens Wiklander sizeof(MBEDTLS_VERSION_STRING_FULL)); 42817466cbSJens Wiklander } 43817466cbSJens Wiklander 44817466cbSJens Wiklander #endif /* MBEDTLS_VERSION_C */ 45