mbed TLS library

Dependents:   HTTPClient-SSL WS_SERVER

Committer:
ansond
Date:
Thu Jun 11 03:27:03 2015 +0000
Revision:
0:137634ff4186
initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ansond 0:137634ff4186 1 /**
ansond 0:137634ff4186 2 * \file version.h
ansond 0:137634ff4186 3 *
ansond 0:137634ff4186 4 * \brief Run-time version information
ansond 0:137634ff4186 5 *
ansond 0:137634ff4186 6 * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved
ansond 0:137634ff4186 7 *
ansond 0:137634ff4186 8 * This file is part of mbed TLS (https://tls.mbed.org)
ansond 0:137634ff4186 9 *
ansond 0:137634ff4186 10 * This program is free software; you can redistribute it and/or modify
ansond 0:137634ff4186 11 * it under the terms of the GNU General Public License as published by
ansond 0:137634ff4186 12 * the Free Software Foundation; either version 2 of the License, or
ansond 0:137634ff4186 13 * (at your option) any later version.
ansond 0:137634ff4186 14 *
ansond 0:137634ff4186 15 * This program is distributed in the hope that it will be useful,
ansond 0:137634ff4186 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
ansond 0:137634ff4186 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ansond 0:137634ff4186 18 * GNU General Public License for more details.
ansond 0:137634ff4186 19 *
ansond 0:137634ff4186 20 * You should have received a copy of the GNU General Public License along
ansond 0:137634ff4186 21 * with this program; if not, write to the Free Software Foundation, Inc.,
ansond 0:137634ff4186 22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
ansond 0:137634ff4186 23 */
ansond 0:137634ff4186 24 /*
ansond 0:137634ff4186 25 * This set of compile-time defines and run-time variables can be used to
ansond 0:137634ff4186 26 * determine the version number of the mbed TLS library used.
ansond 0:137634ff4186 27 */
ansond 0:137634ff4186 28 #ifndef POLARSSL_VERSION_H
ansond 0:137634ff4186 29 #define POLARSSL_VERSION_H
ansond 0:137634ff4186 30
ansond 0:137634ff4186 31 #if !defined(POLARSSL_CONFIG_FILE)
ansond 0:137634ff4186 32 #include "config.h"
ansond 0:137634ff4186 33 #else
ansond 0:137634ff4186 34 #include POLARSSL_CONFIG_FILE
ansond 0:137634ff4186 35 #endif
ansond 0:137634ff4186 36
ansond 0:137634ff4186 37 /**
ansond 0:137634ff4186 38 * The version number x.y.z is split into three parts.
ansond 0:137634ff4186 39 * Major, Minor, Patchlevel
ansond 0:137634ff4186 40 */
ansond 0:137634ff4186 41 #define POLARSSL_VERSION_MAJOR 1
ansond 0:137634ff4186 42 #define POLARSSL_VERSION_MINOR 3
ansond 0:137634ff4186 43 #define POLARSSL_VERSION_PATCH 11
ansond 0:137634ff4186 44
ansond 0:137634ff4186 45 /**
ansond 0:137634ff4186 46 * The single version number has the following structure:
ansond 0:137634ff4186 47 * MMNNPP00
ansond 0:137634ff4186 48 * Major version | Minor version | Patch version
ansond 0:137634ff4186 49 */
ansond 0:137634ff4186 50 #define POLARSSL_VERSION_NUMBER 0x01030B00
ansond 0:137634ff4186 51 #define POLARSSL_VERSION_STRING "1.3.11"
ansond 0:137634ff4186 52 #define POLARSSL_VERSION_STRING_FULL "mbed TLS 1.3.11"
ansond 0:137634ff4186 53
ansond 0:137634ff4186 54 #if defined(POLARSSL_VERSION_C)
ansond 0:137634ff4186 55
ansond 0:137634ff4186 56 #ifdef __cplusplus
ansond 0:137634ff4186 57 extern "C" {
ansond 0:137634ff4186 58 #endif
ansond 0:137634ff4186 59
ansond 0:137634ff4186 60 /**
ansond 0:137634ff4186 61 * Get the version number.
ansond 0:137634ff4186 62 *
ansond 0:137634ff4186 63 * \return The constructed version number in the format
ansond 0:137634ff4186 64 * MMNNPP00 (Major, Minor, Patch).
ansond 0:137634ff4186 65 */
ansond 0:137634ff4186 66 unsigned int version_get_number( void );
ansond 0:137634ff4186 67
ansond 0:137634ff4186 68 /**
ansond 0:137634ff4186 69 * Get the version string ("x.y.z").
ansond 0:137634ff4186 70 *
ansond 0:137634ff4186 71 * \param string The string that will receive the value.
ansond 0:137634ff4186 72 * (Should be at least 9 bytes in size)
ansond 0:137634ff4186 73 */
ansond 0:137634ff4186 74 void version_get_string( char *string );
ansond 0:137634ff4186 75
ansond 0:137634ff4186 76 /**
ansond 0:137634ff4186 77 * Get the full version string ("mbed TLS x.y.z").
ansond 0:137634ff4186 78 *
ansond 0:137634ff4186 79 * \param string The string that will receive the value. The mbed TLS version
ansond 0:137634ff4186 80 * string will use 18 bytes AT MOST including a terminating
ansond 0:137634ff4186 81 * null byte.
ansond 0:137634ff4186 82 * (So the buffer should be at least 18 bytes to receive this
ansond 0:137634ff4186 83 * version string).
ansond 0:137634ff4186 84 */
ansond 0:137634ff4186 85 void version_get_string_full( char *string );
ansond 0:137634ff4186 86
ansond 0:137634ff4186 87 /**
ansond 0:137634ff4186 88 * \brief Check if support for a feature was compiled into this
ansond 0:137634ff4186 89 * mbed TLS binary. This allows you to see at runtime if the
ansond 0:137634ff4186 90 * library was for instance compiled with or without
ansond 0:137634ff4186 91 * Multi-threading support.
ansond 0:137634ff4186 92 *
ansond 0:137634ff4186 93 * Note: only checks against defines in the sections "System
ansond 0:137634ff4186 94 * support", "mbed TLS modules" and "mbed TLS feature
ansond 0:137634ff4186 95 * support" in config.h
ansond 0:137634ff4186 96 *
ansond 0:137634ff4186 97 * \param feature The string for the define to check (e.g. "POLARSSL_AES_C")
ansond 0:137634ff4186 98 *
ansond 0:137634ff4186 99 * \return 0 if the feature is present, -1 if the feature is not
ansond 0:137634ff4186 100 * present and -2 if support for feature checking as a whole
ansond 0:137634ff4186 101 * was not compiled in.
ansond 0:137634ff4186 102 */
ansond 0:137634ff4186 103 int version_check_feature( const char *feature );
ansond 0:137634ff4186 104
ansond 0:137634ff4186 105 #ifdef __cplusplus
ansond 0:137634ff4186 106 }
ansond 0:137634ff4186 107 #endif
ansond 0:137634ff4186 108
ansond 0:137634ff4186 109 #endif /* POLARSSL_VERSION_C */
ansond 0:137634ff4186 110
ansond 0:137634ff4186 111 #endif /* version.h */
ansond 0:137634ff4186 112