From 2088e2ebd9bef9eac9b7b5909234f9d498b8c8c3 Mon Sep 17 00:00:00 2001 From: Nicholas Wilson Date: Tue, 8 Sep 2015 16:53:18 +0100 Subject: [PATCH 1/7] fix const-ness of argument to mbedtls_ssl_conf_cert_profile Otherwise, it's impossible to pass in a pointer to mbedtls_x509_crt_profile_next! --- include/mbedtls/ssl.h | 2 +- library/ssl_tls.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/mbedtls/ssl.h b/include/mbedtls/ssl.h index bd88918ca3..907bba1818 100644 --- a/include/mbedtls/ssl.h +++ b/include/mbedtls/ssl.h @@ -1381,7 +1381,7 @@ void mbedtls_ssl_conf_ciphersuites_for_version( mbedtls_ssl_config *conf, * \param profile Profile to use */ void mbedtls_ssl_conf_cert_profile( mbedtls_ssl_config *conf, - mbedtls_x509_crt_profile *profile ); + const mbedtls_x509_crt_profile *profile ); /** * \brief Set the data required to verify peer certificate diff --git a/library/ssl_tls.c b/library/ssl_tls.c index 14ee521ca4..f1d2dd201c 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -5372,7 +5372,7 @@ void mbedtls_ssl_conf_ciphersuites_for_version( mbedtls_ssl_config *conf, #if defined(MBEDTLS_X509_CRT_PARSE_C) void mbedtls_ssl_conf_cert_profile( mbedtls_ssl_config *conf, - mbedtls_x509_crt_profile *profile ) + const mbedtls_x509_crt_profile *profile ) { conf->cert_profile = profile; } From a6b95f01cc8feb9d9099c4de4ade00cedf2c9ef8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Wed, 9 Sep 2015 13:47:28 +0200 Subject: [PATCH 2/7] Print I/O buffer size in memory.sh --- scripts/memory.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/memory.sh b/scripts/memory.sh index 0738e7de26..3dad2899c7 100755 --- a/scripts/memory.sh +++ b/scripts/memory.sh @@ -52,6 +52,8 @@ do_config() scripts/config.pl unset $FLAG done + grep -F SSL_MAX_CONTENT_LEN $CONFIG_H || echo 'SSL_MAX_CONTENT_LEN=16384' + printf " Executable size... " make clean From a25cab8beaab65ebe434b637ea29f34e6b672c4c Mon Sep 17 00:00:00 2001 From: Embedthis Software Date: Wed, 9 Sep 2015 08:49:48 -0700 Subject: [PATCH 3/7] FIX: compiler warning with recvfrom on 64-bit --- library/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/net.c b/library/net.c index b892df91bd..b5d06888b1 100644 --- a/library/net.c +++ b/library/net.c @@ -319,7 +319,7 @@ int mbedtls_net_accept( mbedtls_net_context *bind_ctx, /* UDP: wait for a message, but keep it in the queue */ char buf[1] = { 0 }; - ret = recvfrom( bind_ctx->fd, buf, sizeof( buf ), MSG_PEEK, + ret = (int) recvfrom( bind_ctx->fd, buf, sizeof( buf ), MSG_PEEK, (struct sockaddr *) &client_addr, &n ); #if defined(_WIN32) From 8a52a7468df34c49e4e75ffd525e9c7c514a247d Mon Sep 17 00:00:00 2001 From: Simon Butcher Date: Fri, 11 Sep 2015 19:44:34 +0100 Subject: [PATCH 4/7] Added PR to Changelog for NWilson --- ChangeLog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChangeLog b/ChangeLog index d3636f00a2..4eb2891011 100644 --- a/ChangeLog +++ b/ChangeLog @@ -50,6 +50,8 @@ Changes Hugo Leisink) (#210). * Add mbedtls_ssl_get_max_frag_len() to query the current maximum fragment length. + * Made X509 profile pointer const in mbedtls_ssl_conf_cert_profile() to allow + use of mbedtls_x509_crt_profile_next. (found by NWilson) = mbed TLS 2.0.0 released 2015-07-13 From d69f14bed817b222d5607a36cf8da4c282fe726e Mon Sep 17 00:00:00 2001 From: Simon Butcher Date: Fri, 11 Sep 2015 20:00:20 +0100 Subject: [PATCH 5/7] Updated Changelog for new version --- ChangeLog | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4eb2891011..17f0e80a99 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ mbed TLS ChangeLog (Sorted per branch, date) += mbed TLS 2.1.1 released 2015-09-?? + +Changes + * Made X509 profile pointer const in mbedtls_ssl_conf_cert_profile() to allow + use of mbedtls_x509_crt_profile_next. (found by NWilson) + = mbed TLS 2.1.0 released 2015-09-04 Features @@ -50,8 +56,6 @@ Changes Hugo Leisink) (#210). * Add mbedtls_ssl_get_max_frag_len() to query the current maximum fragment length. - * Made X509 profile pointer const in mbedtls_ssl_conf_cert_profile() to allow - use of mbedtls_x509_crt_profile_next. (found by NWilson) = mbed TLS 2.0.0 released 2015-07-13 From c57556e52aa0c0028f98528bd7139ca0c56092eb Mon Sep 17 00:00:00 2001 From: Jeremie Miller Date: Sat, 12 Sep 2015 09:57:23 -0600 Subject: [PATCH 6/7] tiny spelling fixes --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 79943d10a2..bcc0a32c05 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ The Make and CMake build systems create three libraries: libmbedcrypto, libmbedx ### Yotta -[yotta](http://yottabuild.org) is a package manager and build system developped by mbed; it is the build system of mbed OS. To install it on your platform, please follow the yotta [installation instructions](http://docs.yottabuild.org/#installing). +[yotta](http://yottabuild.org) is a package manager and build system developed by mbed; it is the build system of mbed OS. To install it on your platform, please follow the yotta [installation instructions](http://docs.yottabuild.org/#installing). Once yotta is installed, you can use it to download the latest version of mbed TLS form the yotta registry with: @@ -64,7 +64,7 @@ In order to run the tests, enter: make check -The tests need Perl to be built and run. If you don't have Perl installed, you can skip buiding the tests with: +The tests need Perl to be built and run. If you don't have Perl installed, you can skip building the tests with: make no_test @@ -122,7 +122,7 @@ To list other available CMake options, use: cmake -LH -Note that, with CMake, if you want to change the compiler or its options after you already ran CMake, you need to clear its cache first, eg (using GNU find): +Note that, with CMake, if you want to change the compiler or its options after you already ran CMake, you need to clear its cache first, e.g. (using GNU find): find . -iname '*cmake*' -not -name CMakeLists.txt -exec rm -rf {} + CC=gcc CFLAGS='-fstack-protector-strong -Wa,--noexecstack' cmake . From a1a1128f7d916d3574c92e03a54cdb8f8103f2ef Mon Sep 17 00:00:00 2001 From: Simon Butcher Date: Mon, 14 Sep 2015 21:30:40 +0100 Subject: [PATCH 7/7] Updated ChangeLog for fix #275 --- ChangeLog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index 17f0e80a99..37c79f6ff8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,9 @@ mbed TLS ChangeLog (Sorted per branch, date) = mbed TLS 2.1.1 released 2015-09-?? +Bugfix + * Fix warning when using a 64bit platform. (found by embedthis) (#275) + Changes * Made X509 profile pointer const in mbedtls_ssl_conf_cert_profile() to allow use of mbedtls_x509_crt_profile_next. (found by NWilson)