mbed TLS library
Dependents: HTTPClient-SSL WS_SERVER
polarssl/version.c@0:137634ff4186, 2015-06-11 (annotated)
- Committer:
- ansond
- Date:
- Thu Jun 11 03:27:03 2015 +0000
- Revision:
- 0:137634ff4186
initial commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ansond | 0:137634ff4186 | 1 | /* |
ansond | 0:137634ff4186 | 2 | * Version information |
ansond | 0:137634ff4186 | 3 | * |
ansond | 0:137634ff4186 | 4 | * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved |
ansond | 0:137634ff4186 | 5 | * |
ansond | 0:137634ff4186 | 6 | * This file is part of mbed TLS (https://tls.mbed.org) |
ansond | 0:137634ff4186 | 7 | * |
ansond | 0:137634ff4186 | 8 | * This program is free software; you can redistribute it and/or modify |
ansond | 0:137634ff4186 | 9 | * it under the terms of the GNU General Public License as published by |
ansond | 0:137634ff4186 | 10 | * the Free Software Foundation; either version 2 of the License, or |
ansond | 0:137634ff4186 | 11 | * (at your option) any later version. |
ansond | 0:137634ff4186 | 12 | * |
ansond | 0:137634ff4186 | 13 | * This program is distributed in the hope that it will be useful, |
ansond | 0:137634ff4186 | 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
ansond | 0:137634ff4186 | 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
ansond | 0:137634ff4186 | 16 | * GNU General Public License for more details. |
ansond | 0:137634ff4186 | 17 | * |
ansond | 0:137634ff4186 | 18 | * You should have received a copy of the GNU General Public License along |
ansond | 0:137634ff4186 | 19 | * with this program; if not, write to the Free Software Foundation, Inc., |
ansond | 0:137634ff4186 | 20 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
ansond | 0:137634ff4186 | 21 | */ |
ansond | 0:137634ff4186 | 22 | |
ansond | 0:137634ff4186 | 23 | #if !defined(POLARSSL_CONFIG_FILE) |
ansond | 0:137634ff4186 | 24 | #include "polarssl/config.h" |
ansond | 0:137634ff4186 | 25 | #else |
ansond | 0:137634ff4186 | 26 | #include POLARSSL_CONFIG_FILE |
ansond | 0:137634ff4186 | 27 | #endif |
ansond | 0:137634ff4186 | 28 | |
ansond | 0:137634ff4186 | 29 | #if defined(POLARSSL_VERSION_C) |
ansond | 0:137634ff4186 | 30 | |
ansond | 0:137634ff4186 | 31 | #include "polarssl/version.h" |
ansond | 0:137634ff4186 | 32 | #include <string.h> |
ansond | 0:137634ff4186 | 33 | |
ansond | 0:137634ff4186 | 34 | unsigned int version_get_number() |
ansond | 0:137634ff4186 | 35 | { |
ansond | 0:137634ff4186 | 36 | return( POLARSSL_VERSION_NUMBER ); |
ansond | 0:137634ff4186 | 37 | } |
ansond | 0:137634ff4186 | 38 | |
ansond | 0:137634ff4186 | 39 | void version_get_string( char *string ) |
ansond | 0:137634ff4186 | 40 | { |
ansond | 0:137634ff4186 | 41 | memcpy( string, POLARSSL_VERSION_STRING, |
ansond | 0:137634ff4186 | 42 | sizeof( POLARSSL_VERSION_STRING ) ); |
ansond | 0:137634ff4186 | 43 | } |
ansond | 0:137634ff4186 | 44 | |
ansond | 0:137634ff4186 | 45 | void version_get_string_full( char *string ) |
ansond | 0:137634ff4186 | 46 | { |
ansond | 0:137634ff4186 | 47 | memcpy( string, POLARSSL_VERSION_STRING_FULL, |
ansond | 0:137634ff4186 | 48 | sizeof( POLARSSL_VERSION_STRING_FULL ) ); |
ansond | 0:137634ff4186 | 49 | } |
ansond | 0:137634ff4186 | 50 | |
ansond | 0:137634ff4186 | 51 | #endif /* POLARSSL_VERSION_C */ |
ansond | 0:137634ff4186 | 52 |