From a152e42e9b9c633dbbbb207e1e6916e660e67d22 Mon Sep 17 00:00:00 2001 From: Jaeden Amero Date: Wed, 29 May 2019 09:38:29 +0100 Subject: [PATCH 1/6] net_sockets: Fix typo in net_would_block() Fixes #528 --- ChangeLog | 1 + library/net_sockets.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 965876f2a8..04570e4c92 100644 --- a/ChangeLog +++ b/ChangeLog @@ -63,6 +63,7 @@ Bugfix * Fix multiple X.509 functions previously returning ASN.1 low-level error codes to always wrap these codes into X.509 high level error codes before returning. Fixes #2431. + * Fix typo in net_would_block(). Fixes #528 reported by github-monoculture. API Changes * Extend the MBEDTLS_SSL_EXPORT_KEYS to export the handshake randbytes, diff --git a/library/net_sockets.c b/library/net_sockets.c index 816b1303df..5d538bfd56 100644 --- a/library/net_sockets.c +++ b/library/net_sockets.c @@ -284,7 +284,7 @@ static int net_would_block( const mbedtls_net_context *ctx ) int err = errno; /* - * Never return 'WOULD BLOCK' on a non-blocking socket + * Never return 'WOULD BLOCK' on a blocking socket */ if( ( fcntl( ctx->fd, F_GETFL ) & O_NONBLOCK ) != O_NONBLOCK ) { From a18092655624196f64313f54cc97d78c2af3e817 Mon Sep 17 00:00:00 2001 From: Jaeden Amero Date: Thu, 30 May 2019 13:15:33 +0100 Subject: [PATCH 2/6] timing: Remove redundant include file There is no need to include winbase.h, as it will be pulled in by windows.h as needed. Fixes #2640 --- ChangeLog | 1 + library/timing.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 04570e4c92..fbc9d7bf65 100644 --- a/ChangeLog +++ b/ChangeLog @@ -64,6 +64,7 @@ Bugfix codes to always wrap these codes into X.509 high level error codes before returning. Fixes #2431. * Fix typo in net_would_block(). Fixes #528 reported by github-monoculture. + * Remove redundant include file in timing.c. Fixes #2640 reported by irwir. API Changes * Extend the MBEDTLS_SSL_EXPORT_KEYS to export the handshake randbytes, diff --git a/library/timing.c b/library/timing.c index 413d133fb6..009516a6e3 100644 --- a/library/timing.c +++ b/library/timing.c @@ -51,7 +51,6 @@ #if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32) #include -#include #include struct _hr_time From 32eb58ff29becd1eca066d9779d2e04319943350 Mon Sep 17 00:00:00 2001 From: Jaeden Amero Date: Thu, 30 May 2019 13:18:24 +0100 Subject: [PATCH 3/6] platform: Include stdarg.h where needed Windows builds also need stdarg.h included when using variadic functions. Fixes #2656 --- ChangeLog | 2 ++ include/mbedtls/platform.h | 1 + 2 files changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index fbc9d7bf65..e2389d57e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -65,6 +65,8 @@ Bugfix returning. Fixes #2431. * Fix typo in net_would_block(). Fixes #528 reported by github-monoculture. * Remove redundant include file in timing.c. Fixes #2640 reported by irwir. + * Fix build failure when building with mingw on Windows by including + stdarg.h where needed. Fixes #2656. API Changes * Extend the MBEDTLS_SSL_EXPORT_KEYS to export the handshake randbytes, diff --git a/include/mbedtls/platform.h b/include/mbedtls/platform.h index 801a948bc5..363d6b3db2 100644 --- a/include/mbedtls/platform.h +++ b/include/mbedtls/platform.h @@ -256,6 +256,7 @@ int mbedtls_platform_set_snprintf( int (*snprintf_func)( char * s, size_t n, * the destination buffer is too short. */ #if defined(MBEDTLS_PLATFORM_HAS_NON_CONFORMING_VSNPRINTF) +#include /* For Older Windows (inc. MSYS2), we provide our own fixed implementation */ int mbedtls_platform_win32_vsnprintf( char *s, size_t n, const char *fmt, va_list arg ); #endif From 4f4af6e2ef41b38043ecc72a019b06ddad8702f6 Mon Sep 17 00:00:00 2001 From: Jaeden Amero Date: Mon, 3 Jun 2019 08:13:10 +0100 Subject: [PATCH 4/6] windows: Fix Release x64 configuration Inherit PlatformToolset from the project configuration. This allow the project to configure PlatformToolset, and aligns the Release x64 build with other build types. Fixes #1430 --- ChangeLog | 3 +++ scripts/data_files/vs2010-app-template.vcxproj | 1 - visualc/VS2010/aescrypt2.vcxproj | 1 - visualc/VS2010/benchmark.vcxproj | 1 - visualc/VS2010/cert_app.vcxproj | 1 - visualc/VS2010/cert_req.vcxproj | 1 - visualc/VS2010/cert_write.vcxproj | 1 - visualc/VS2010/crl_app.vcxproj | 1 - visualc/VS2010/crypt_and_hash.vcxproj | 1 - visualc/VS2010/dh_client.vcxproj | 1 - visualc/VS2010/dh_genprime.vcxproj | 1 - visualc/VS2010/dh_server.vcxproj | 1 - visualc/VS2010/dtls_client.vcxproj | 1 - visualc/VS2010/dtls_server.vcxproj | 1 - visualc/VS2010/ecdh_curve25519.vcxproj | 1 - visualc/VS2010/ecdsa.vcxproj | 1 - visualc/VS2010/gen_entropy.vcxproj | 1 - visualc/VS2010/gen_key.vcxproj | 1 - visualc/VS2010/gen_random_ctr_drbg.vcxproj | 1 - visualc/VS2010/gen_random_havege.vcxproj | 1 - visualc/VS2010/generic_sum.vcxproj | 1 - visualc/VS2010/hello.vcxproj | 1 - visualc/VS2010/key_app.vcxproj | 1 - visualc/VS2010/key_app_writer.vcxproj | 1 - visualc/VS2010/mini_client.vcxproj | 1 - visualc/VS2010/mpi_demo.vcxproj | 1 - visualc/VS2010/pem2der.vcxproj | 1 - visualc/VS2010/pk_decrypt.vcxproj | 1 - visualc/VS2010/pk_encrypt.vcxproj | 1 - visualc/VS2010/pk_sign.vcxproj | 1 - visualc/VS2010/pk_verify.vcxproj | 1 - visualc/VS2010/query_compile_time_config.vcxproj | 1 - visualc/VS2010/req_app.vcxproj | 1 - visualc/VS2010/rsa_decrypt.vcxproj | 1 - visualc/VS2010/rsa_encrypt.vcxproj | 1 - visualc/VS2010/rsa_genkey.vcxproj | 1 - visualc/VS2010/rsa_sign.vcxproj | 1 - visualc/VS2010/rsa_sign_pss.vcxproj | 1 - visualc/VS2010/rsa_verify.vcxproj | 1 - visualc/VS2010/rsa_verify_pss.vcxproj | 1 - visualc/VS2010/selftest.vcxproj | 1 - visualc/VS2010/ssl_client1.vcxproj | 1 - visualc/VS2010/ssl_client2.vcxproj | 1 - visualc/VS2010/ssl_fork_server.vcxproj | 1 - visualc/VS2010/ssl_mail_client.vcxproj | 1 - visualc/VS2010/ssl_server.vcxproj | 1 - visualc/VS2010/ssl_server2.vcxproj | 1 - visualc/VS2010/strerror.vcxproj | 1 - visualc/VS2010/udp_proxy.vcxproj | 1 - visualc/VS2010/zeroize.vcxproj | 1 - 50 files changed, 3 insertions(+), 49 deletions(-) diff --git a/ChangeLog b/ChangeLog index e2389d57e7..7e9190097f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -67,6 +67,9 @@ Bugfix * Remove redundant include file in timing.c. Fixes #2640 reported by irwir. * Fix build failure when building with mingw on Windows by including stdarg.h where needed. Fixes #2656. + * Fix Visual Studio Release x64 build configuration by inheriting + PlatformToolset from the project configuration. Fixes #1430 reported by + irwir. API Changes * Extend the MBEDTLS_SSL_EXPORT_KEYS to export the handshake randbytes, diff --git a/scripts/data_files/vs2010-app-template.vcxproj b/scripts/data_files/vs2010-app-template.vcxproj index 1b454d9a35..e7bb122d8b 100644 --- a/scripts/data_files/vs2010-app-template.vcxproj +++ b/scripts/data_files/vs2010-app-template.vcxproj @@ -53,7 +53,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/aescrypt2.vcxproj b/visualc/VS2010/aescrypt2.vcxproj index 398c0a94c3..1d9d6cf7c1 100644 --- a/visualc/VS2010/aescrypt2.vcxproj +++ b/visualc/VS2010/aescrypt2.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/benchmark.vcxproj b/visualc/VS2010/benchmark.vcxproj index 75bfb2e27e..789c4d28f3 100644 --- a/visualc/VS2010/benchmark.vcxproj +++ b/visualc/VS2010/benchmark.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/cert_app.vcxproj b/visualc/VS2010/cert_app.vcxproj index b689b366ce..f37351702a 100644 --- a/visualc/VS2010/cert_app.vcxproj +++ b/visualc/VS2010/cert_app.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/cert_req.vcxproj b/visualc/VS2010/cert_req.vcxproj index c5017e3f58..244dd44f8b 100644 --- a/visualc/VS2010/cert_req.vcxproj +++ b/visualc/VS2010/cert_req.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/cert_write.vcxproj b/visualc/VS2010/cert_write.vcxproj index 302c04d4c9..8fa76482b0 100644 --- a/visualc/VS2010/cert_write.vcxproj +++ b/visualc/VS2010/cert_write.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/crl_app.vcxproj b/visualc/VS2010/crl_app.vcxproj index 7cb1bb0403..cf337598f0 100644 --- a/visualc/VS2010/crl_app.vcxproj +++ b/visualc/VS2010/crl_app.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/crypt_and_hash.vcxproj b/visualc/VS2010/crypt_and_hash.vcxproj index 043cb5b5fc..521877e5d2 100644 --- a/visualc/VS2010/crypt_and_hash.vcxproj +++ b/visualc/VS2010/crypt_and_hash.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/dh_client.vcxproj b/visualc/VS2010/dh_client.vcxproj index 08c1880bf2..1e360e4269 100644 --- a/visualc/VS2010/dh_client.vcxproj +++ b/visualc/VS2010/dh_client.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/dh_genprime.vcxproj b/visualc/VS2010/dh_genprime.vcxproj index 5435312c90..d893ff3b18 100644 --- a/visualc/VS2010/dh_genprime.vcxproj +++ b/visualc/VS2010/dh_genprime.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/dh_server.vcxproj b/visualc/VS2010/dh_server.vcxproj index 0b739ccdc2..ee24e05465 100644 --- a/visualc/VS2010/dh_server.vcxproj +++ b/visualc/VS2010/dh_server.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/dtls_client.vcxproj b/visualc/VS2010/dtls_client.vcxproj index 5d5966ec11..2e33bf6924 100644 --- a/visualc/VS2010/dtls_client.vcxproj +++ b/visualc/VS2010/dtls_client.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/dtls_server.vcxproj b/visualc/VS2010/dtls_server.vcxproj index 367c502fed..4c1e9eea42 100644 --- a/visualc/VS2010/dtls_server.vcxproj +++ b/visualc/VS2010/dtls_server.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/ecdh_curve25519.vcxproj b/visualc/VS2010/ecdh_curve25519.vcxproj index 9401154bf1..d082610baa 100644 --- a/visualc/VS2010/ecdh_curve25519.vcxproj +++ b/visualc/VS2010/ecdh_curve25519.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/ecdsa.vcxproj b/visualc/VS2010/ecdsa.vcxproj index 01566440b4..b9e8ca8719 100644 --- a/visualc/VS2010/ecdsa.vcxproj +++ b/visualc/VS2010/ecdsa.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/gen_entropy.vcxproj b/visualc/VS2010/gen_entropy.vcxproj index 2cab3834e6..5d50ce0be4 100644 --- a/visualc/VS2010/gen_entropy.vcxproj +++ b/visualc/VS2010/gen_entropy.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/gen_key.vcxproj b/visualc/VS2010/gen_key.vcxproj index 345880a0d6..d9b1bcc49b 100644 --- a/visualc/VS2010/gen_key.vcxproj +++ b/visualc/VS2010/gen_key.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/gen_random_ctr_drbg.vcxproj b/visualc/VS2010/gen_random_ctr_drbg.vcxproj index d0e20b9bb4..123f57f36a 100644 --- a/visualc/VS2010/gen_random_ctr_drbg.vcxproj +++ b/visualc/VS2010/gen_random_ctr_drbg.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/gen_random_havege.vcxproj b/visualc/VS2010/gen_random_havege.vcxproj index 46fe004a29..26b4f53fdf 100644 --- a/visualc/VS2010/gen_random_havege.vcxproj +++ b/visualc/VS2010/gen_random_havege.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/generic_sum.vcxproj b/visualc/VS2010/generic_sum.vcxproj index 4df9bfeddb..59152010d4 100644 --- a/visualc/VS2010/generic_sum.vcxproj +++ b/visualc/VS2010/generic_sum.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/hello.vcxproj b/visualc/VS2010/hello.vcxproj index 9c4614fb6a..9959b54ac4 100644 --- a/visualc/VS2010/hello.vcxproj +++ b/visualc/VS2010/hello.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/key_app.vcxproj b/visualc/VS2010/key_app.vcxproj index 8f4909ae0d..6bd10ec3b4 100644 --- a/visualc/VS2010/key_app.vcxproj +++ b/visualc/VS2010/key_app.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/key_app_writer.vcxproj b/visualc/VS2010/key_app_writer.vcxproj index e885955db1..f53be18d6d 100644 --- a/visualc/VS2010/key_app_writer.vcxproj +++ b/visualc/VS2010/key_app_writer.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/mini_client.vcxproj b/visualc/VS2010/mini_client.vcxproj index 819584f4c7..46faa54883 100644 --- a/visualc/VS2010/mini_client.vcxproj +++ b/visualc/VS2010/mini_client.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/mpi_demo.vcxproj b/visualc/VS2010/mpi_demo.vcxproj index 8a2a28ea38..5264cb43e8 100644 --- a/visualc/VS2010/mpi_demo.vcxproj +++ b/visualc/VS2010/mpi_demo.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/pem2der.vcxproj b/visualc/VS2010/pem2der.vcxproj index 6a364b5779..1903b1e2e7 100644 --- a/visualc/VS2010/pem2der.vcxproj +++ b/visualc/VS2010/pem2der.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/pk_decrypt.vcxproj b/visualc/VS2010/pk_decrypt.vcxproj index c24ae9979f..c4512f91c4 100644 --- a/visualc/VS2010/pk_decrypt.vcxproj +++ b/visualc/VS2010/pk_decrypt.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/pk_encrypt.vcxproj b/visualc/VS2010/pk_encrypt.vcxproj index d5fc64529c..2c2b06a203 100644 --- a/visualc/VS2010/pk_encrypt.vcxproj +++ b/visualc/VS2010/pk_encrypt.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/pk_sign.vcxproj b/visualc/VS2010/pk_sign.vcxproj index 174a7dbc0a..a200c4404a 100644 --- a/visualc/VS2010/pk_sign.vcxproj +++ b/visualc/VS2010/pk_sign.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/pk_verify.vcxproj b/visualc/VS2010/pk_verify.vcxproj index 2c286a294e..832fcd005f 100644 --- a/visualc/VS2010/pk_verify.vcxproj +++ b/visualc/VS2010/pk_verify.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/query_compile_time_config.vcxproj b/visualc/VS2010/query_compile_time_config.vcxproj index dbf5845d0a..fbc1278d77 100644 --- a/visualc/VS2010/query_compile_time_config.vcxproj +++ b/visualc/VS2010/query_compile_time_config.vcxproj @@ -55,7 +55,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/req_app.vcxproj b/visualc/VS2010/req_app.vcxproj index 895f8457c5..647bc510d9 100644 --- a/visualc/VS2010/req_app.vcxproj +++ b/visualc/VS2010/req_app.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/rsa_decrypt.vcxproj b/visualc/VS2010/rsa_decrypt.vcxproj index df7f9b7700..81cbc96a29 100644 --- a/visualc/VS2010/rsa_decrypt.vcxproj +++ b/visualc/VS2010/rsa_decrypt.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/rsa_encrypt.vcxproj b/visualc/VS2010/rsa_encrypt.vcxproj index b1cc878f5b..b404cd112d 100644 --- a/visualc/VS2010/rsa_encrypt.vcxproj +++ b/visualc/VS2010/rsa_encrypt.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/rsa_genkey.vcxproj b/visualc/VS2010/rsa_genkey.vcxproj index ac1c10e64e..c37a3b8861 100644 --- a/visualc/VS2010/rsa_genkey.vcxproj +++ b/visualc/VS2010/rsa_genkey.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/rsa_sign.vcxproj b/visualc/VS2010/rsa_sign.vcxproj index a276d37d8c..c4c7b3973b 100644 --- a/visualc/VS2010/rsa_sign.vcxproj +++ b/visualc/VS2010/rsa_sign.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/rsa_sign_pss.vcxproj b/visualc/VS2010/rsa_sign_pss.vcxproj index dce75ff747..7538d4d600 100644 --- a/visualc/VS2010/rsa_sign_pss.vcxproj +++ b/visualc/VS2010/rsa_sign_pss.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/rsa_verify.vcxproj b/visualc/VS2010/rsa_verify.vcxproj index 7ef5b3f43a..807df85ee1 100644 --- a/visualc/VS2010/rsa_verify.vcxproj +++ b/visualc/VS2010/rsa_verify.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/rsa_verify_pss.vcxproj b/visualc/VS2010/rsa_verify_pss.vcxproj index 83db60cbd7..a50c2b436d 100644 --- a/visualc/VS2010/rsa_verify_pss.vcxproj +++ b/visualc/VS2010/rsa_verify_pss.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/selftest.vcxproj b/visualc/VS2010/selftest.vcxproj index 684f77d95f..10ac8fcb11 100644 --- a/visualc/VS2010/selftest.vcxproj +++ b/visualc/VS2010/selftest.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/ssl_client1.vcxproj b/visualc/VS2010/ssl_client1.vcxproj index 48e95a2a3a..5fecb55590 100644 --- a/visualc/VS2010/ssl_client1.vcxproj +++ b/visualc/VS2010/ssl_client1.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/ssl_client2.vcxproj b/visualc/VS2010/ssl_client2.vcxproj index 5f662686f9..b181fecc9c 100644 --- a/visualc/VS2010/ssl_client2.vcxproj +++ b/visualc/VS2010/ssl_client2.vcxproj @@ -55,7 +55,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/ssl_fork_server.vcxproj b/visualc/VS2010/ssl_fork_server.vcxproj index 3c067eab6f..608e9895e2 100644 --- a/visualc/VS2010/ssl_fork_server.vcxproj +++ b/visualc/VS2010/ssl_fork_server.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/ssl_mail_client.vcxproj b/visualc/VS2010/ssl_mail_client.vcxproj index 20deeb4076..1738d253e8 100644 --- a/visualc/VS2010/ssl_mail_client.vcxproj +++ b/visualc/VS2010/ssl_mail_client.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/ssl_server.vcxproj b/visualc/VS2010/ssl_server.vcxproj index e53b7a4a7d..136199f807 100644 --- a/visualc/VS2010/ssl_server.vcxproj +++ b/visualc/VS2010/ssl_server.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/ssl_server2.vcxproj b/visualc/VS2010/ssl_server2.vcxproj index 60e30a826e..04e55d837d 100644 --- a/visualc/VS2010/ssl_server2.vcxproj +++ b/visualc/VS2010/ssl_server2.vcxproj @@ -55,7 +55,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/strerror.vcxproj b/visualc/VS2010/strerror.vcxproj index 21186a82b7..5560361b5c 100644 --- a/visualc/VS2010/strerror.vcxproj +++ b/visualc/VS2010/strerror.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/udp_proxy.vcxproj b/visualc/VS2010/udp_proxy.vcxproj index de5adf7ed3..47d31b2039 100644 --- a/visualc/VS2010/udp_proxy.vcxproj +++ b/visualc/VS2010/udp_proxy.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK diff --git a/visualc/VS2010/zeroize.vcxproj b/visualc/VS2010/zeroize.vcxproj index 0c73799776..730fcb0318 100644 --- a/visualc/VS2010/zeroize.vcxproj +++ b/visualc/VS2010/zeroize.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK From d4311049260df838e2fe596d2b7165180d1d14cb Mon Sep 17 00:00:00 2001 From: Jaeden Amero Date: Mon, 3 Jun 2019 08:27:16 +0100 Subject: [PATCH 5/6] ssl_tls: Enable Suite B with subset of ECP curves Make sure the code compiles even if some curves are not defined. Fixes #1591 --- ChangeLog | 2 ++ library/ssl_tls.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index 7e9190097f..bca38b54f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -70,6 +70,8 @@ Bugfix * Fix Visual Studio Release x64 build configuration by inheriting PlatformToolset from the project configuration. Fixes #1430 reported by irwir. + * Enable Suite B with subset of ECP curves. Make sure the code compiles even + if some curves are not defined. Fixes #1591 reported by dbedev. API Changes * Extend the MBEDTLS_SSL_EXPORT_KEYS to export the handshake randbytes, diff --git a/library/ssl_tls.c b/library/ssl_tls.c index d9e777d8a7..68a1e592e2 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -10536,8 +10536,12 @@ static int ssl_preset_suiteb_hashes[] = { #if defined(MBEDTLS_ECP_C) static mbedtls_ecp_group_id ssl_preset_suiteb_curves[] = { +#if defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) MBEDTLS_ECP_DP_SECP256R1, +#endif +#if defined(MBEDTLS_ECP_DP_SECP384R1_ENABLED) MBEDTLS_ECP_DP_SECP384R1, +#endif MBEDTLS_ECP_DP_NONE }; #endif From befe1e1536e15011ae3cdd8cb01313b5a26a2bb5 Mon Sep 17 00:00:00 2001 From: Jaeden Amero Date: Mon, 3 Jun 2019 09:14:14 +0100 Subject: [PATCH 6/6] programs: Make `make clean` clean all programs always If `make TEST_CPP:=1` is run, and then `make clean` (as opposed to `make TEST_CPP:=1 clean`), the cpp_dummy_build will be left behind after the clean. Make `make clean more convenient to use by removing programs that could be generated from any configuration, not just the active one. Fixes #1862 --- ChangeLog | 1 + programs/Makefile | 2 ++ 2 files changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index bca38b54f5..02c3bb2d1d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -98,6 +98,7 @@ Changes * Change wording in the `mbedtls_ssl_conf_max_frag_len()`'s documentation to improve clarity. Fixes #2258. * Replace multiple uses of MD2 by SHA-256 in X.509 test suite. Fixes #821. + * Make `make clean` clean all programs always. Fixes #1862. = mbed TLS 2.17.0 branch released 2019-03-19 diff --git a/programs/Makefile b/programs/Makefile index 14ba54393f..a914407197 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -300,6 +300,8 @@ x509/req_app$(EXEXT): x509/req_app.c $(DEP) clean: ifndef WINDOWS rm -f $(APPS) + -rm -f ssl/ssl_pthread_server$(EXEXT) + -rm -f test/cpp_dummy_build$(EXEXT) else del /S /Q /F *.o *.exe endif