Merge pull request #6283 from cconlon/tls13resume12
In SendTls13ClientHello() only send Session ID for sessions being resumed (< TLS 1.3)
This commit is contained in:
commit
50e15dbb36
16
src/tls13.c
16
src/tls13.c
@ -4084,7 +4084,7 @@ int SendTls13ClientHello(WOLFSSL* ssl)
|
||||
ssl->options.tls13MiddleBoxCompat = 1;
|
||||
}
|
||||
#else
|
||||
if (ssl->session->sessionIDSz > 0)
|
||||
if (ssl->options.resuming && ssl->session->sessionIDSz > 0)
|
||||
args->length += ssl->session->sessionIDSz;
|
||||
#endif
|
||||
|
||||
@ -4229,10 +4229,16 @@ int SendTls13ClientHello(WOLFSSL* ssl)
|
||||
|
||||
if (ssl->session->sessionIDSz > 0) {
|
||||
/* Session resumption for old versions of protocol. */
|
||||
args->output[args->idx++] = ID_LEN;
|
||||
XMEMCPY(args->output + args->idx, ssl->session->sessionID,
|
||||
ssl->session->sessionIDSz);
|
||||
args->idx += ID_LEN;
|
||||
if (ssl->options.resuming) {
|
||||
args->output[args->idx++] = ID_LEN;
|
||||
XMEMCPY(args->output + args->idx, ssl->session->sessionID,
|
||||
ssl->session->sessionIDSz);
|
||||
args->idx += ID_LEN;
|
||||
}
|
||||
else {
|
||||
/* Not resuming, zero length session ID */
|
||||
args->output[args->idx++] = 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
#ifdef WOLFSSL_TLS13_MIDDLEBOX_COMPAT
|
||||
|
Loading…
x
Reference in New Issue
Block a user