blob: ac77222a63b6621a838b5d1aecc578cc38197eec [file] [log] [blame]
Paul Bakker3ac1b2d2010-06-18 22:47:29 +00001/*
2 * Version information
3 *
Manuel Pégourié-Gonnarda658a402015-01-23 09:45:19 +00004 * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved
Paul Bakkerb96f1542010-07-18 20:36:00 +00005 *
Manuel Pégourié-Gonnard085ab042015-01-23 11:06:27 +00006 * This file is part of mbed TLS (https://www.polarssl.org)
Paul Bakkerb96f1542010-07-18 20:36:00 +00007 *
Paul Bakker3ac1b2d2010-06-18 22:47:29 +00008 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 */
22
Manuel Pégourié-Gonnardcef4ad22014-04-29 12:39:06 +020023#if !defined(POLARSSL_CONFIG_FILE)
Paul Bakker3ac1b2d2010-06-18 22:47:29 +000024#include "polarssl/config.h"
Manuel Pégourié-Gonnardcef4ad22014-04-29 12:39:06 +020025#else
26#include POLARSSL_CONFIG_FILE
27#endif
Paul Bakker3ac1b2d2010-06-18 22:47:29 +000028
29#if defined(POLARSSL_VERSION_C)
30
31#include "polarssl/version.h"
32#include <string.h>
33
34const char version[] = POLARSSL_VERSION_STRING;
35
36unsigned int version_get_number()
37{
Paul Bakkerd8bb8262014-06-17 14:06:49 +020038 return( POLARSSL_VERSION_NUMBER );
Paul Bakker3ac1b2d2010-06-18 22:47:29 +000039}
40
41void version_get_string( char *string )
42{
Paul Bakkerb9e4e2c2014-05-01 14:18:25 +020043 memcpy( string, POLARSSL_VERSION_STRING,
44 sizeof( POLARSSL_VERSION_STRING ) );
Paul Bakker3ac1b2d2010-06-18 22:47:29 +000045}
46
47void version_get_string_full( char *string )
48{
Paul Bakkerb9e4e2c2014-05-01 14:18:25 +020049 memcpy( string, POLARSSL_VERSION_STRING_FULL,
50 sizeof( POLARSSL_VERSION_STRING_FULL ) );
Paul Bakker3ac1b2d2010-06-18 22:47:29 +000051}
52
53#endif /* POLARSSL_VERSION_C */