1*817466cbSJens Wiklander /* 2*817466cbSJens Wiklander * Version information 3*817466cbSJens Wiklander * 4*817466cbSJens Wiklander * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved 5*817466cbSJens Wiklander * SPDX-License-Identifier: Apache-2.0 6*817466cbSJens Wiklander * 7*817466cbSJens Wiklander * Licensed under the Apache License, Version 2.0 (the "License"); you may 8*817466cbSJens Wiklander * not use this file except in compliance with the License. 9*817466cbSJens Wiklander * You may obtain a copy of the License at 10*817466cbSJens Wiklander * 11*817466cbSJens Wiklander * http://www.apache.org/licenses/LICENSE-2.0 12*817466cbSJens Wiklander * 13*817466cbSJens Wiklander * Unless required by applicable law or agreed to in writing, software 14*817466cbSJens Wiklander * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 15*817466cbSJens Wiklander * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16*817466cbSJens Wiklander * See the License for the specific language governing permissions and 17*817466cbSJens Wiklander * limitations under the License. 18*817466cbSJens Wiklander * 19*817466cbSJens Wiklander * This file is part of mbed TLS (https://tls.mbed.org) 20*817466cbSJens Wiklander */ 21*817466cbSJens Wiklander 22*817466cbSJens Wiklander #if !defined(MBEDTLS_CONFIG_FILE) 23*817466cbSJens Wiklander #include "mbedtls/config.h" 24*817466cbSJens Wiklander #else 25*817466cbSJens Wiklander #include MBEDTLS_CONFIG_FILE 26*817466cbSJens Wiklander #endif 27*817466cbSJens Wiklander 28*817466cbSJens Wiklander #if defined(MBEDTLS_VERSION_C) 29*817466cbSJens Wiklander 30*817466cbSJens Wiklander #include "mbedtls/version.h" 31*817466cbSJens Wiklander #include <string.h> 32*817466cbSJens Wiklander 33*817466cbSJens Wiklander unsigned int mbedtls_version_get_number() 34*817466cbSJens Wiklander { 35*817466cbSJens Wiklander return( MBEDTLS_VERSION_NUMBER ); 36*817466cbSJens Wiklander } 37*817466cbSJens Wiklander 38*817466cbSJens Wiklander void mbedtls_version_get_string( char *string ) 39*817466cbSJens Wiklander { 40*817466cbSJens Wiklander memcpy( string, MBEDTLS_VERSION_STRING, 41*817466cbSJens Wiklander sizeof( MBEDTLS_VERSION_STRING ) ); 42*817466cbSJens Wiklander } 43*817466cbSJens Wiklander 44*817466cbSJens Wiklander void mbedtls_version_get_string_full( char *string ) 45*817466cbSJens Wiklander { 46*817466cbSJens Wiklander memcpy( string, MBEDTLS_VERSION_STRING_FULL, 47*817466cbSJens Wiklander sizeof( MBEDTLS_VERSION_STRING_FULL ) ); 48*817466cbSJens Wiklander } 49*817466cbSJens Wiklander 50*817466cbSJens Wiklander #endif /* MBEDTLS_VERSION_C */ 51