diff --git a/src/tls.c b/src/tls.c index 814099f9e..dbb737f18 100644 --- a/src/tls.c +++ b/src/tls.c @@ -8062,7 +8062,7 @@ int TLSX_PopulateExtensions(WOLFSSL* ssl, byte isServer) } #if defined(HAVE_SESSION_TICKET) - if (ssl->options.resuming) { + if (ssl->options.resuming && ssl->ctx->ticketEncCb != NULL) { WOLFSSL_SESSION* sess = &ssl->session; word32 milli; diff --git a/src/tls13.c b/src/tls13.c index d0856efb0..bf16be20a 100644 --- a/src/tls13.c +++ b/src/tls13.c @@ -3173,6 +3173,9 @@ static int DoPreSharedKeys(WOLFSSL* ssl, const byte* input, word32 helloSz, break; } + if (current == NULL) + return 0; + /* Hash the rest of the ClientHello. */ ret = HashInputRaw(ssl, input + helloSz - bindersLen, bindersLen); if (ret != 0)