1c6672fdcSEdison Ai // SPDX-License-Identifier: Apache-2.0 2817466cbSJens Wiklander /* 3817466cbSJens Wiklander * Version information 4817466cbSJens Wiklander * 5817466cbSJens Wiklander * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved 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 * This file is part of mbed TLS (https://tls.mbed.org) 20817466cbSJens Wiklander */ 21817466cbSJens Wiklander 22817466cbSJens Wiklander #if !defined(MBEDTLS_CONFIG_FILE) 23817466cbSJens Wiklander #include "mbedtls/config.h" 24817466cbSJens Wiklander #else 25817466cbSJens Wiklander #include MBEDTLS_CONFIG_FILE 26817466cbSJens Wiklander #endif 27817466cbSJens Wiklander 28817466cbSJens Wiklander #if defined(MBEDTLS_VERSION_C) 29817466cbSJens Wiklander 30817466cbSJens Wiklander #include "mbedtls/version.h" 31817466cbSJens Wiklander #include <string.h> 32817466cbSJens Wiklander 33*3d3b0591SJens Wiklander unsigned int mbedtls_version_get_number( void ) 34817466cbSJens Wiklander { 35817466cbSJens Wiklander return( MBEDTLS_VERSION_NUMBER ); 36817466cbSJens Wiklander } 37817466cbSJens Wiklander 38817466cbSJens Wiklander void mbedtls_version_get_string( char *string ) 39817466cbSJens Wiklander { 40817466cbSJens Wiklander memcpy( string, MBEDTLS_VERSION_STRING, 41817466cbSJens Wiklander sizeof( MBEDTLS_VERSION_STRING ) ); 42817466cbSJens Wiklander } 43817466cbSJens Wiklander 44817466cbSJens Wiklander void mbedtls_version_get_string_full( char *string ) 45817466cbSJens Wiklander { 46817466cbSJens Wiklander memcpy( string, MBEDTLS_VERSION_STRING_FULL, 47817466cbSJens Wiklander sizeof( MBEDTLS_VERSION_STRING_FULL ) ); 48817466cbSJens Wiklander } 49817466cbSJens Wiklander 50817466cbSJens Wiklander #endif /* MBEDTLS_VERSION_C */ 51