SNI fix for nginx

pull/1385/head
Sean Parkinson 2018-02-21 22:24:42 +10:00
parent d1f19e8ecc
commit dc4edd0cd9
2 changed files with 4 additions and 3 deletions

View File

@ -8062,7 +8062,7 @@ int TLSX_PopulateExtensions(WOLFSSL* ssl, byte isServer)
}
#if defined(HAVE_SESSION_TICKET)
if (ssl->options.resuming && ssl->ctx->ticketEncCb != NULL) {
if (ssl->options.resuming && ssl->session.ticketLen > 0) {
WOLFSSL_SESSION* sess = &ssl->session;
word32 milli;

View File

@ -3570,10 +3570,11 @@ int DoTls13ClientHello(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
return ret;
}
#ifdef HAVE_STUNNEL
#if defined(HAVE_STUNNEL) || defined(WOLFSSL_NGINX) || defined(WOLFSSL_HAPROXY)
if ((ret = SNI_Callback(ssl)) != 0)
return ret;
#endif /*HAVE_STUNNEL*/
ssl->options.side = WOLFSSL_SERVER_END;
#endif /* HAVE_STUNNELi || WOLFSSL_NGINX || WOLFSSL_HAPROXY */
if (TLSX_Find(ssl->extensions, TLSX_SUPPORTED_VERSIONS) == NULL) {
if (!ssl->options.downgrade) {