From c98204e68f4022b02c4520c4137e7b8480559cef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Tue, 11 Aug 2015 04:21:01 +0200 Subject: [PATCH] Fix missing break in switch for SSL presets closes #235 --- CMakeLists.txt | 2 +- ChangeLog | 2 ++ library/ssl_tls.c | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 607b2c4c8..867372923 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,7 +39,7 @@ if(CMAKE_COMPILER_IS_GNUCC) endif(CMAKE_COMPILER_IS_GNUCC) if(CMAKE_COMPILER_IS_CLANG) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -W -Wdeclaration-after-statement -Wwrite-strings -Wpointer-arith") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -W -Wdeclaration-after-statement -Wwrite-strings -Wpointer-arith -Wimplicit-fallthrough") set(CMAKE_C_FLAGS_RELEASE "-O2") set(CMAKE_C_FLAGS_DEBUG "-O0 -g3") set(CMAKE_C_FLAGS_COVERAGE "-O0 -g3 --coverage") diff --git a/ChangeLog b/ChangeLog index d10791f4f..f74ba3444 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24,6 +24,8 @@ Bugfix with make. * Fix link error when building shared libraries for Windows with make. * Fix error when loading libmbedtls.so. + * Fix bug in mbedtls_ssl_conf_default() that caused the default preset to + be always used (found by dcb314) (#235) Changes * The PEM parser now accepts a trailing space at end of lines (#226). diff --git a/library/ssl_tls.c b/library/ssl_tls.c index 4938964b7..9007562fb 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -6836,6 +6836,7 @@ int mbedtls_ssl_config_defaults( mbedtls_ssl_config *conf, #if defined(MBEDTLS_ECP_C) conf->curve_list = ssl_preset_suiteb_curves; #endif + break; /* * Default