mbedtls ported to mbed-classic

Fork of mbedtls by Christopher Haster

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers version.c Source File

version.c

00001 /*
00002  *  Version information
00003  *
00004  *  Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
00005  *  SPDX-License-Identifier: Apache-2.0
00006  *
00007  *  Licensed under the Apache License, Version 2.0 (the "License"); you may
00008  *  not use this file except in compliance with the License.
00009  *  You may obtain a copy of the License at
00010  *
00011  *  http://www.apache.org/licenses/LICENSE-2.0
00012  *
00013  *  Unless required by applicable law or agreed to in writing, software
00014  *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
00015  *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00016  *  See the License for the specific language governing permissions and
00017  *  limitations under the License.
00018  *
00019  *  This file is part of mbed TLS (https://tls.mbed.org)
00020  */
00021 
00022 #if !defined(MBEDTLS_CONFIG_FILE)
00023 #include "mbedtls/config.h"
00024 #else
00025 #include MBEDTLS_CONFIG_FILE
00026 #endif
00027 
00028 #if defined(MBEDTLS_VERSION_C)
00029 
00030 #include "mbedtls/version.h"
00031 #include <string.h>
00032 
00033 unsigned int mbedtls_version_get_number()
00034 {
00035     return( MBEDTLS_VERSION_NUMBER );
00036 }
00037 
00038 void mbedtls_version_get_string( char *string )
00039 {
00040     memcpy( string, MBEDTLS_VERSION_STRING,
00041             sizeof( MBEDTLS_VERSION_STRING ) );
00042 }
00043 
00044 void mbedtls_version_get_string_full( char *string )
00045 {
00046     memcpy( string, MBEDTLS_VERSION_STRING_FULL,
00047             sizeof( MBEDTLS_VERSION_STRING_FULL ) );
00048 }
00049 
00050 #endif /* MBEDTLS_VERSION_C */