mbed TLS upgraded to 2.6.0
Fork of mbedtls by
scripts/data_files/version_features.fmt@1:9ebc941037d5, 2017-09-29 (annotated)
- Committer:
- Jasper Wallace
- Date:
- Fri Sep 29 18:41:59 2017 +0100
- Revision:
- 1:9ebc941037d5
Update to mbedtls 2.4.2, security fixes
Changes to mbedtls sources made:
in include/mbedtls/config.h comment out:
#define MBEDTLS_FS_IO
#define MBEDTLS_NET_C
#define MBEDTLS_TIMING_C
uncomment:
#define MBEDTLS_NO_PLATFORM_ENTROPY
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Jasper Wallace |
1:9ebc941037d5 | 1 | /* |
Jasper Wallace |
1:9ebc941037d5 | 2 | * Version feature information |
Jasper Wallace |
1:9ebc941037d5 | 3 | * |
Jasper Wallace |
1:9ebc941037d5 | 4 | * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved |
Jasper Wallace |
1:9ebc941037d5 | 5 | * SPDX-License-Identifier: Apache-2.0 |
Jasper Wallace |
1:9ebc941037d5 | 6 | * |
Jasper Wallace |
1:9ebc941037d5 | 7 | * Licensed under the Apache License, Version 2.0 (the "License"); you may |
Jasper Wallace |
1:9ebc941037d5 | 8 | * not use this file except in compliance with the License. |
Jasper Wallace |
1:9ebc941037d5 | 9 | * You may obtain a copy of the License at |
Jasper Wallace |
1:9ebc941037d5 | 10 | * |
Jasper Wallace |
1:9ebc941037d5 | 11 | * http://www.apache.org/licenses/LICENSE-2.0 |
Jasper Wallace |
1:9ebc941037d5 | 12 | * |
Jasper Wallace |
1:9ebc941037d5 | 13 | * Unless required by applicable law or agreed to in writing, software |
Jasper Wallace |
1:9ebc941037d5 | 14 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
Jasper Wallace |
1:9ebc941037d5 | 15 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
Jasper Wallace |
1:9ebc941037d5 | 16 | * See the License for the specific language governing permissions and |
Jasper Wallace |
1:9ebc941037d5 | 17 | * limitations under the License. |
Jasper Wallace |
1:9ebc941037d5 | 18 | * |
Jasper Wallace |
1:9ebc941037d5 | 19 | * This file is part of mbed TLS (https://tls.mbed.org) |
Jasper Wallace |
1:9ebc941037d5 | 20 | */ |
Jasper Wallace |
1:9ebc941037d5 | 21 | |
Jasper Wallace |
1:9ebc941037d5 | 22 | #if !defined(MBEDTLS_CONFIG_FILE) |
Jasper Wallace |
1:9ebc941037d5 | 23 | #include "mbedtls/config.h" |
Jasper Wallace |
1:9ebc941037d5 | 24 | #else |
Jasper Wallace |
1:9ebc941037d5 | 25 | #include MBEDTLS_CONFIG_FILE |
Jasper Wallace |
1:9ebc941037d5 | 26 | #endif |
Jasper Wallace |
1:9ebc941037d5 | 27 | |
Jasper Wallace |
1:9ebc941037d5 | 28 | #if defined(MBEDTLS_VERSION_C) |
Jasper Wallace |
1:9ebc941037d5 | 29 | |
Jasper Wallace |
1:9ebc941037d5 | 30 | #include "mbedtls/version.h" |
Jasper Wallace |
1:9ebc941037d5 | 31 | |
Jasper Wallace |
1:9ebc941037d5 | 32 | #include <string.h> |
Jasper Wallace |
1:9ebc941037d5 | 33 | |
Jasper Wallace |
1:9ebc941037d5 | 34 | static const char *features[] = { |
Jasper Wallace |
1:9ebc941037d5 | 35 | #if defined(MBEDTLS_VERSION_FEATURES) |
Jasper Wallace |
1:9ebc941037d5 | 36 | FEATURE_DEFINES |
Jasper Wallace |
1:9ebc941037d5 | 37 | #endif /* MBEDTLS_VERSION_FEATURES */ |
Jasper Wallace |
1:9ebc941037d5 | 38 | NULL |
Jasper Wallace |
1:9ebc941037d5 | 39 | }; |
Jasper Wallace |
1:9ebc941037d5 | 40 | |
Jasper Wallace |
1:9ebc941037d5 | 41 | int mbedtls_version_check_feature( const char *feature ) |
Jasper Wallace |
1:9ebc941037d5 | 42 | { |
Jasper Wallace |
1:9ebc941037d5 | 43 | const char **idx = features; |
Jasper Wallace |
1:9ebc941037d5 | 44 | |
Jasper Wallace |
1:9ebc941037d5 | 45 | if( *idx == NULL ) |
Jasper Wallace |
1:9ebc941037d5 | 46 | return( -2 ); |
Jasper Wallace |
1:9ebc941037d5 | 47 | |
Jasper Wallace |
1:9ebc941037d5 | 48 | if( feature == NULL ) |
Jasper Wallace |
1:9ebc941037d5 | 49 | return( -1 ); |
Jasper Wallace |
1:9ebc941037d5 | 50 | |
Jasper Wallace |
1:9ebc941037d5 | 51 | while( *idx != NULL ) |
Jasper Wallace |
1:9ebc941037d5 | 52 | { |
Jasper Wallace |
1:9ebc941037d5 | 53 | if( !strcmp( *idx, feature ) ) |
Jasper Wallace |
1:9ebc941037d5 | 54 | return( 0 ); |
Jasper Wallace |
1:9ebc941037d5 | 55 | idx++; |
Jasper Wallace |
1:9ebc941037d5 | 56 | } |
Jasper Wallace |
1:9ebc941037d5 | 57 | return( -1 ); |
Jasper Wallace |
1:9ebc941037d5 | 58 | } |
Jasper Wallace |
1:9ebc941037d5 | 59 | |
Jasper Wallace |
1:9ebc941037d5 | 60 | #endif /* MBEDTLS_VERSION_C */ |