From 88a6e89fb62c6a157856dae408255d039f6e79ec Mon Sep 17 00:00:00 2001 From: Jaeden Amero Date: Wed, 29 May 2019 09:38:29 +0100 Subject: [PATCH 1/5] 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 8c1d03c0b..e2561c93e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -46,6 +46,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. Changes * Return from various debugging routines immediately if the diff --git a/library/net_sockets.c b/library/net_sockets.c index 816b1303d..5d538bfd5 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 b196a0a7818cc471f34571672e32a5cc2c6dce63 Mon Sep 17 00:00:00 2001 From: Jaeden Amero Date: Thu, 30 May 2019 13:15:33 +0100 Subject: [PATCH 2/5] 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 e2561c93e..452d087f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -47,6 +47,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. Changes * Return from various debugging routines immediately if the diff --git a/library/timing.c b/library/timing.c index 413d133fb..009516a6e 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 73a36ff512079cdc32483067cba95bfa505540b1 Mon Sep 17 00:00:00 2001 From: Jaeden Amero Date: Mon, 3 Jun 2019 08:13:10 +0100 Subject: [PATCH 3/5] 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 452d087f7..556a9b39d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -48,6 +48,9 @@ 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 Visual Studio Release x64 build configuration by inheriting + PlatformToolset from the project configuration. Fixes #1430 reported by + irwir. Changes * Return from various debugging routines immediately if the diff --git a/scripts/data_files/vs2010-app-template.vcxproj b/scripts/data_files/vs2010-app-template.vcxproj index fac9812e6..1db7ee42a 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 db387f979..63a124aee 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 934c84438..ffbd1ad4d 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 fef0efe6d..6f1c46eeb 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 7d8694bfe..1e7edd025 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 8891d8aef..bed8728e4 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 c51caef54..9fbd408a9 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 99199d965..fb7ef77d1 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 b2fae8093..a0990e1d5 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 d9c19009a..fdd6c6fdf 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 6f87cb8b0..d1a73453b 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 60715fe29..72b2d4b9e 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 8789d7fea..b975369f3 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 1120111f1..748b6d121 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 3718c9f27..03418d082 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 4c57655b2..89b41c081 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 a07e1aacc..c8ea11f42 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 11740c448..64200afbe 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 01253ceef..70c8138a0 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 0f2ecb43c..21bd90f62 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 c986b07be..b5f6eb005 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 f96a0b052..0fc246a8f 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 0e4af3a58..e4ef62b04 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 b5567bdfe..3756404dd 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 d68bc75b3..d770d35af 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 507c79a4d..2f1248c5d 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 5ccaf4f1e..168adf34b 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 d5ef208d8..bb09f06aa 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 d21f17a41..98941f4be 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 637ddd6f5..6d3006e61 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 83a29f067..e14764722 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 3ffcea594..992efcfb4 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 9e1d0a20e..ffba32a6a 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 c3b03716c..9f5f32784 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 e6b506000..824e3043c 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 c1147c3c2..dda4756cd 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 adfee6d9c..31da8cade 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 bb44b4f9d..b78dfc338 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 7781aa51a..220ad2d42 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 12ff76d70..1f5e10918 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 4ac158224..c36a8ed11 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 a960facf0..aa9a0c3af 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 922a9953e..84c917d83 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 a9b01d0d5..a89e3322d 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 ae28e1839..7fb841e55 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 06a91cb49..b74bd6543 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 d7ec570d6..c3ec8fa74 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 30ae55e99..e75dd9a29 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 9d311c721..dff71d30e 100644 --- a/visualc/VS2010/zeroize.vcxproj +++ b/visualc/VS2010/zeroize.vcxproj @@ -54,7 +54,6 @@ false true Unicode - Windows7.1SDK From 16529b21fabeadf0aaae621b6ac2e054ef6a13de Mon Sep 17 00:00:00 2001 From: Jaeden Amero Date: Mon, 3 Jun 2019 08:27:16 +0100 Subject: [PATCH 4/5] 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 556a9b39d..9b5456ec6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -51,6 +51,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. Changes * Return from various debugging routines immediately if the diff --git a/library/ssl_tls.c b/library/ssl_tls.c index 38690fa66..424b0714c 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -9043,8 +9043,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 0c42e908e5eb0eb07568220835f99ff5a2e170c2 Mon Sep 17 00:00:00 2001 From: Jaeden Amero Date: Mon, 3 Jun 2019 09:14:14 +0100 Subject: [PATCH 5/5] 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 9b5456ec6..9016091e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -64,6 +64,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.16.1 branch released 2019-03-19 diff --git a/programs/Makefile b/programs/Makefile index 28c747b76..d09949bbf 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -296,6 +296,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