do session conversion dance

This commit is contained in:
JacobBarthelmeh
2024-06-04 14:41:01 -06:00
parent 533aa48b14
commit 119d2a5da1
2 changed files with 7 additions and 1 deletions

View File

@@ -751,6 +751,7 @@ long wolfSSL_CTX_set_session_cache_mode(WOLFSSL_CTX* ctx, long mode)
/* return the max fragment size set when handshake was negotiated */ /* return the max fragment size set when handshake was negotiated */
uint8_t wolfSSL_SESSION_get_max_fragment_length(WOLFSSL_SESSION* session) uint8_t wolfSSL_SESSION_get_max_fragment_length(WOLFSSL_SESSION* session)
{ {
session = ClientSessionToSession(session);
if (session == NULL) { if (session == NULL) {
return 0; return 0;
} }
@@ -3908,6 +3909,10 @@ static int wolfSSL_DupSessionEx(const WOLFSSL_SESSION* input,
} }
ticBuff = NULL; ticBuff = NULL;
#ifdef HAVE_MAX_FRAGMENT
output->mfl = input->mfl;
#endif
#if defined(WOLFSSL_TLS13) && defined(WOLFSSL_TICKET_NONCE_MALLOC) && \ #if defined(WOLFSSL_TLS13) && defined(WOLFSSL_TICKET_NONCE_MALLOC) && \
(!defined(HAVE_FIPS) || (defined(FIPS_VERSION_GE) && FIPS_VERSION_GE(5,3))) (!defined(HAVE_FIPS) || (defined(FIPS_VERSION_GE) && FIPS_VERSION_GE(5,3)))
if (preallocUsed != NULL) if (preallocUsed != NULL)

View File

@@ -2988,8 +2988,9 @@ static int TLSX_MFL_Parse(WOLFSSL* ssl, const byte* input, word16 length,
WOLFSSL_ERROR_VERBOSE(UNKNOWN_MAX_FRAG_LEN_E); WOLFSSL_ERROR_VERBOSE(UNKNOWN_MAX_FRAG_LEN_E);
return UNKNOWN_MAX_FRAG_LEN_E; return UNKNOWN_MAX_FRAG_LEN_E;
} }
if (ssl->session != NULL) if (ssl->session != NULL) {
ssl->session->mfl = *input; ssl->session->mfl = *input;
}
#ifndef NO_WOLFSSL_SERVER #ifndef NO_WOLFSSL_SERVER
if (isRequest) { if (isRequest) {