Server Side Renegotiation

1. Add an extra guard check around a call to SendHelloRequest() in the case where server renegotiation is disabled.
2. Replaced an accidental deletion of an include of the misc.h header for no inline builds.
This commit is contained in:
John Safranek
2018-11-29 09:08:48 -08:00
parent 69436b6d41
commit ec76ab7e42
2 changed files with 3 additions and 3 deletions

View File

@@ -2395,13 +2395,13 @@ int wolfSSL_Rehandshake(WOLFSSL* ssl)
ssl->secure_renegotiation->cache_status = SCR_CACHE_NEEDED; ssl->secure_renegotiation->cache_status = SCR_CACHE_NEEDED;
#ifndef NO_WOLFSSL_SERVER #if !defined(NO_WOLFSSL_SERVER) && defined(HAVE_SERVER_RENEGOTIATION_INFO)
if (ssl->options.side == WOLFSSL_SERVER_END) { if (ssl->options.side == WOLFSSL_SERVER_END) {
ret = SendHelloRequest(ssl); ret = SendHelloRequest(ssl);
if (ret != 0) if (ret != 0)
return ret; return ret;
} }
#endif /* NO_WOLFSSL_SERVER*/ #endif /* NO_WOLFSSL_SERVER && HAVE_SERVER_RENEGOTIATION_INFO */
ret = InitHandshakeHashes(ssl); ret = InitHandshakeHashes(ssl);
if (ret !=0) if (ret !=0)

View File

@@ -34,7 +34,7 @@
#include <wolfssl/error-ssl.h> #include <wolfssl/error-ssl.h>
#include <wolfssl/wolfcrypt/hmac.h> #include <wolfssl/wolfcrypt/hmac.h>
#ifdef NO_INLINE #ifdef NO_INLINE
#include <wolfssl/wolfcrypt/misc.h>
#else #else
#define WOLFSSL_MISC_INCLUDED #define WOLFSSL_MISC_INCLUDED
#include <wolfcrypt/src/misc.c> #include <wolfcrypt/src/misc.c>