Skip to content

Commit

Permalink
do session conversion dance
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobBarthelmeh committed Jun 4, 2024
1 parent 533aa48 commit 119d2a5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/ssl_sess.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
uint8_t wolfSSL_SESSION_get_max_fragment_length(WOLFSSL_SESSION* session)
{
session = ClientSessionToSession(session);
if (session == NULL) {
return 0;
}
Expand Down Expand Up @@ -3908,6 +3909,10 @@ static int wolfSSL_DupSessionEx(const WOLFSSL_SESSION* input,
}
ticBuff = NULL;

#ifdef HAVE_MAX_FRAGMENT
output->mfl = input->mfl;
#endif

#if defined(WOLFSSL_TLS13) && defined(WOLFSSL_TICKET_NONCE_MALLOC) && \
(!defined(HAVE_FIPS) || (defined(FIPS_VERSION_GE) && FIPS_VERSION_GE(5,3)))
if (preallocUsed != NULL)
Expand Down
3 changes: 2 additions & 1 deletion src/tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -2988,8 +2988,9 @@ static int TLSX_MFL_Parse(WOLFSSL* ssl, const byte* input, word16 length,
WOLFSSL_ERROR_VERBOSE(UNKNOWN_MAX_FRAG_LEN_E);
return UNKNOWN_MAX_FRAG_LEN_E;
}
if (ssl->session != NULL)
if (ssl->session != NULL) {
ssl->session->mfl = *input;
}

#ifndef NO_WOLFSSL_SERVER
if (isRequest) {
Expand Down

0 comments on commit 119d2a5

Please sign in to comment.