From 3387b12a9a02c614b489134649729d01fad26b76 Mon Sep 17 00:00:00 2001 From: David Garske Date: Fri, 28 Jul 2017 15:24:53 -0700 Subject: [PATCH] Fix for building with `NO_CERTS` or `NO_WOLFSSL_SERVER` defined. --- src/internal.c | 4 +++- src/ssl.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/internal.c b/src/internal.c index a93aaf193..53264d105 100755 --- a/src/internal.c +++ b/src/internal.c @@ -2643,7 +2643,9 @@ void InitSuites(Suites* suites, ProtocolVersion pv, int keySz, word16 haveRSA, InitSuitesHashSigAlgo(suites, haveECDSAsig, haveRSAsig, 0, tls1_2, keySz); } -#if !defined(NO_WOLFSSL_SERVER) || !defined(NO_CERTS) +#if !defined(NO_WOLFSSL_SERVER) || !defined(NO_CERTS) || \ + (!defined(NO_WOLFSSL_CLIENT) && (!defined(NO_DH) || defined(HAVE_ECC))) + /* Decode the signature algorithm. * * input The encoded signature algorithm. diff --git a/src/ssl.c b/src/ssl.c index bb517cf20..24b608cae 100755 --- a/src/ssl.c +++ b/src/ssl.c @@ -1408,7 +1408,9 @@ int wolfSSL_CTX_SetMinEccKey_Sz(WOLFSSL_CTX* ctx, short keySz) } ctx->minEccKeySz = keySz / 8; +#ifndef NO_CERTS ctx->cm->minEccKeySz = keySz / 8; +#endif return SSL_SUCCESS; }