Skip to content

Commit 119d2a5

Browse files
do session conversion dance
1 parent 533aa48 commit 119d2a5

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/ssl_sess.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,7 @@ long wolfSSL_CTX_set_session_cache_mode(WOLFSSL_CTX* ctx, long mode)
751751
/* return the max fragment size set when handshake was negotiated */
752752
uint8_t wolfSSL_SESSION_get_max_fragment_length(WOLFSSL_SESSION* session)
753753
{
754+
session = ClientSessionToSession(session);
754755
if (session == NULL) {
755756
return 0;
756757
}
@@ -3908,6 +3909,10 @@ static int wolfSSL_DupSessionEx(const WOLFSSL_SESSION* input,
39083909
}
39093910
ticBuff = NULL;
39103911

3912+
#ifdef HAVE_MAX_FRAGMENT
3913+
output->mfl = input->mfl;
3914+
#endif
3915+
39113916
#if defined(WOLFSSL_TLS13) && defined(WOLFSSL_TICKET_NONCE_MALLOC) && \
39123917
(!defined(HAVE_FIPS) || (defined(FIPS_VERSION_GE) && FIPS_VERSION_GE(5,3)))
39133918
if (preallocUsed != NULL)

src/tls.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2988,8 +2988,9 @@ static int TLSX_MFL_Parse(WOLFSSL* ssl, const byte* input, word16 length,
29882988
WOLFSSL_ERROR_VERBOSE(UNKNOWN_MAX_FRAG_LEN_E);
29892989
return UNKNOWN_MAX_FRAG_LEN_E;
29902990
}
2991-
if (ssl->session != NULL)
2991+
if (ssl->session != NULL) {
29922992
ssl->session->mfl = *input;
2993+
}
29932994

29942995
#ifndef NO_WOLFSSL_SERVER
29952996
if (isRequest) {

0 commit comments

Comments
 (0)