mbed TLS upgraded to 2.6.0

Fork of mbedtls by Mark Radbourne

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?

UserRevisionLine numberNew contents of line
Jasper Wallace 1:9ebc941037d5 1 #! /usr/bin/env sh
Jasper Wallace 1:9ebc941037d5 2
Jasper Wallace 1:9ebc941037d5 3 # output_env.sh
Jasper Wallace 1:9ebc941037d5 4 #
Jasper Wallace 1:9ebc941037d5 5 # This file is part of mbed TLS (https://tls.mbed.org)
Jasper Wallace 1:9ebc941037d5 6 #
Jasper Wallace 1:9ebc941037d5 7 # Copyright (c) 2016, ARM Limited, All Rights Reserved
Jasper Wallace 1:9ebc941037d5 8 #
Jasper Wallace 1:9ebc941037d5 9 # Purpose
Jasper Wallace 1:9ebc941037d5 10 #
Jasper Wallace 1:9ebc941037d5 11 # To print out all the relevant information about the development environment.
Jasper Wallace 1:9ebc941037d5 12 #
Jasper Wallace 1:9ebc941037d5 13 # This includes:
Jasper Wallace 1:9ebc941037d5 14 # - architecture of the system
Jasper Wallace 1:9ebc941037d5 15 # - type and version of the operating system
Jasper Wallace 1:9ebc941037d5 16 # - version of armcc, clang, gcc-arm and gcc compilers
Jasper Wallace 1:9ebc941037d5 17 # - version of libc, clang, asan and valgrind if installed
Jasper Wallace 1:9ebc941037d5 18 # - version of gnuTLS and OpenSSL
Jasper Wallace 1:9ebc941037d5 19
Jasper Wallace 1:9ebc941037d5 20 print_version()
Jasper Wallace 1:9ebc941037d5 21 {
Jasper Wallace 1:9ebc941037d5 22 BIN="$1"
Jasper Wallace 1:9ebc941037d5 23 shift
Jasper Wallace 1:9ebc941037d5 24 ARGS="$1"
Jasper Wallace 1:9ebc941037d5 25 shift
Jasper Wallace 1:9ebc941037d5 26 FAIL_MSG="$1"
Jasper Wallace 1:9ebc941037d5 27 shift
Jasper Wallace 1:9ebc941037d5 28
Jasper Wallace 1:9ebc941037d5 29 if ! `type "$BIN" > /dev/null 2>&1`; then
Jasper Wallace 1:9ebc941037d5 30 echo "* $FAIL_MSG"
Jasper Wallace 1:9ebc941037d5 31 return 0
Jasper Wallace 1:9ebc941037d5 32 fi
Jasper Wallace 1:9ebc941037d5 33
Jasper Wallace 1:9ebc941037d5 34 BIN=`which "$BIN"`
Jasper Wallace 1:9ebc941037d5 35 VERSION_STR=`$BIN $ARGS 2>&1`
Jasper Wallace 1:9ebc941037d5 36
Jasper Wallace 1:9ebc941037d5 37 # Apply all filters
Jasper Wallace 1:9ebc941037d5 38 while [ $# -gt 0 ]; do
Jasper Wallace 1:9ebc941037d5 39 FILTER="$1"
Jasper Wallace 1:9ebc941037d5 40 shift
Jasper Wallace 1:9ebc941037d5 41 VERSION_STR=`echo "$VERSION_STR" | $FILTER`
Jasper Wallace 1:9ebc941037d5 42 done
Jasper Wallace 1:9ebc941037d5 43
Jasper Wallace 1:9ebc941037d5 44 echo "* ${BIN##*/}: $BIN: $VERSION_STR"
Jasper Wallace 1:9ebc941037d5 45 }
Jasper Wallace 1:9ebc941037d5 46
Jasper Wallace 1:9ebc941037d5 47 print_version "uname" "-a" ""
Jasper Wallace 1:9ebc941037d5 48 echo
Jasper Wallace 1:9ebc941037d5 49
Jasper Wallace 1:9ebc941037d5 50 : ${ARMC5_CC:=armcc}
Jasper Wallace 1:9ebc941037d5 51 print_version "$ARMC5_CC" "--vsn" "armcc not found!" "head -n 2"
Jasper Wallace 1:9ebc941037d5 52 echo
Jasper Wallace 1:9ebc941037d5 53
Jasper Wallace 1:9ebc941037d5 54 : ${ARMC6_CC:=armclang}
Jasper Wallace 1:9ebc941037d5 55 print_version "$ARMC6_CC" "--vsn" "armclang not found!" "head -n 2"
Jasper Wallace 1:9ebc941037d5 56 echo
Jasper Wallace 1:9ebc941037d5 57
Jasper Wallace 1:9ebc941037d5 58 print_version "arm-none-eabi-gcc" "--version" "gcc-arm not found!" "head -n 1"
Jasper Wallace 1:9ebc941037d5 59 echo
Jasper Wallace 1:9ebc941037d5 60
Jasper Wallace 1:9ebc941037d5 61 print_version "gcc" "--version" "gcc not found!" "head -n 1"
Jasper Wallace 1:9ebc941037d5 62 echo
Jasper Wallace 1:9ebc941037d5 63
Jasper Wallace 1:9ebc941037d5 64 print_version "clang" "--version" "clang not found" "head -n 2"
Jasper Wallace 1:9ebc941037d5 65 echo
Jasper Wallace 1:9ebc941037d5 66
Jasper Wallace 1:9ebc941037d5 67 print_version "ldd" "--version" \
Jasper Wallace 1:9ebc941037d5 68 "No ldd present: can't determine libc version!" \
Jasper Wallace 1:9ebc941037d5 69 "head -n 1"
Jasper Wallace 1:9ebc941037d5 70 echo
Jasper Wallace 1:9ebc941037d5 71
Jasper Wallace 1:9ebc941037d5 72 print_version "valgrind" "--version" "valgrind not found!"
Jasper Wallace 1:9ebc941037d5 73 echo
Jasper Wallace 1:9ebc941037d5 74
Jasper Wallace 1:9ebc941037d5 75 : ${OPENSSL:=openssl}
Jasper Wallace 1:9ebc941037d5 76 print_version "$OPENSSL" "version" "openssl not found!"
Jasper Wallace 1:9ebc941037d5 77 echo
Jasper Wallace 1:9ebc941037d5 78
Jasper Wallace 1:9ebc941037d5 79 if [ -n "${OPENSSL_LEGACY+set}" ]; then
Jasper Wallace 1:9ebc941037d5 80 print_version "$OPENSSL_LEGACY" "version" "openssl legacy version not found!"
Jasper Wallace 1:9ebc941037d5 81 echo
Jasper Wallace 1:9ebc941037d5 82 fi
Jasper Wallace 1:9ebc941037d5 83
Jasper Wallace 1:9ebc941037d5 84 : ${GNUTLS_CLI:=gnutls-cli}
Jasper Wallace 1:9ebc941037d5 85 print_version "$GNUTLS_CLI" "--version" "gnuTLS client not found!" "head -n 1"
Jasper Wallace 1:9ebc941037d5 86 echo
Jasper Wallace 1:9ebc941037d5 87
Jasper Wallace 1:9ebc941037d5 88 : ${GNUTLS_SERV:=gnutls-serv}
Jasper Wallace 1:9ebc941037d5 89 print_version "$GNUTLS_SERV" "--version" "gnuTLS server not found!" "head -n 1"
Jasper Wallace 1:9ebc941037d5 90 echo
Jasper Wallace 1:9ebc941037d5 91
Jasper Wallace 1:9ebc941037d5 92 if [ -n "${GNUTLS_LEGACY_CLI+set}" ]; then
Jasper Wallace 1:9ebc941037d5 93 print_version "$GNUTLS_LEGACY_CLI" "--version" \
Jasper Wallace 1:9ebc941037d5 94 "gnuTLS client legacy version not found!" \
Jasper Wallace 1:9ebc941037d5 95 "head -n 1"
Jasper Wallace 1:9ebc941037d5 96 echo
Jasper Wallace 1:9ebc941037d5 97 fi
Jasper Wallace 1:9ebc941037d5 98
Jasper Wallace 1:9ebc941037d5 99 if [ -n "${GNUTLS_LEGACY_SERV+set}" ]; then
Jasper Wallace 1:9ebc941037d5 100 print_version "$GNUTLS_LEGACY_SERV" "--version" \
Jasper Wallace 1:9ebc941037d5 101 "gnuTLS server legacy version not found!" \
Jasper Wallace 1:9ebc941037d5 102 "head -n 1"
Jasper Wallace 1:9ebc941037d5 103 echo
Jasper Wallace 1:9ebc941037d5 104 fi
Jasper Wallace 1:9ebc941037d5 105
Jasper Wallace 1:9ebc941037d5 106 if `hash dpkg > /dev/null 2>&1`; then
Jasper Wallace 1:9ebc941037d5 107 echo "* asan:"
Jasper Wallace 1:9ebc941037d5 108 dpkg -s libasan2 2> /dev/null | grep -i version
Jasper Wallace 1:9ebc941037d5 109 dpkg -s libasan1 2> /dev/null | grep -i version
Jasper Wallace 1:9ebc941037d5 110 dpkg -s libasan0 2> /dev/null | grep -i version
Jasper Wallace 1:9ebc941037d5 111 else
Jasper Wallace 1:9ebc941037d5 112 echo "* No dpkg present: can't determine asan version!"
Jasper Wallace 1:9ebc941037d5 113 fi
Jasper Wallace 1:9ebc941037d5 114 echo