From 784ce57f453ad906bb2987048668bcf2c64e684a Mon Sep 17 00:00:00 2001 From: David Garske Date: Thu, 19 Jan 2017 09:23:07 -0800 Subject: [PATCH] Fix for TLSX_PopulateExtensions to not use #else HAVE_QSH case for populating supported curves. --- src/tls.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/tls.c b/src/tls.c index 27114aa60..cfabb0cfe 100644 --- a/src/tls.c +++ b/src/tls.c @@ -4493,7 +4493,6 @@ int TLSX_PopulateExtensions(WOLFSSL* ssl, byte isServer) /* server will add extension depending on whats parsed from client */ if (!isServer) { - #ifdef HAVE_QSH /* test if user has set a specific scheme already */ if (!ssl->user_set_QSHSchemes) { @@ -4564,8 +4563,9 @@ int TLSX_PopulateExtensions(WOLFSSL* ssl, byte isServer) } } } -#else - #if defined(HAVE_ECC) && defined(HAVE_SUPPORTED_CURVES) +#endif + +#if defined(HAVE_ECC) && defined(HAVE_SUPPORTED_CURVES) if (!ssl->options.userCurves && !ssl->ctx->userCurves) { #if defined(HAVE_ECC160) || defined(HAVE_ALL_CURVES) #ifndef NO_ECC_SECP @@ -4638,8 +4638,7 @@ int TLSX_PopulateExtensions(WOLFSSL* ssl, byte isServer) #endif #endif } - #endif /* HAVE_ECC && HAVE_SUPPORTED_CURVES */ -#endif +#endif /* HAVE_ECC && HAVE_SUPPORTED_CURVES */ } /* is not server */ (void)public_key;