Fix HelloRetryRequest for Draft 18
This commit is contained in:
parent
08a0b98f52
commit
207b275d24
@ -2467,9 +2467,11 @@ static int DoTls13HelloRetryRequest(WOLFSSL* ssl, const byte* input,
|
|||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
#ifndef WOLFSSL_TLS13_DRAFT_18
|
||||||
/* Set the cipher suite from the message. */
|
/* Set the cipher suite from the message. */
|
||||||
ssl->options.cipherSuite0 = input[i++];
|
ssl->options.cipherSuite0 = input[i++];
|
||||||
ssl->options.cipherSuite = input[i++];
|
ssl->options.cipherSuite = input[i++];
|
||||||
|
#endif
|
||||||
|
|
||||||
ret = SetCipherSpecs(ssl);
|
ret = SetCipherSpecs(ssl);
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
@ -3273,9 +3275,11 @@ int SendTls13HelloRetryRequest(WOLFSSL* ssl)
|
|||||||
output[idx++] = TLS_DRAFT_MAJOR;
|
output[idx++] = TLS_DRAFT_MAJOR;
|
||||||
output[idx++] = TLS_DRAFT_MINOR;
|
output[idx++] = TLS_DRAFT_MINOR;
|
||||||
|
|
||||||
|
#ifndef WOLFSSL_TLS13_DRAFT_18
|
||||||
/* Chosen cipher suite */
|
/* Chosen cipher suite */
|
||||||
output[idx++] = ssl->options.cipherSuite0;
|
output[idx++] = ssl->options.cipherSuite0;
|
||||||
output[idx++] = ssl->options.cipherSuite;
|
output[idx++] = ssl->options.cipherSuite;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Add TLS extensions. */
|
/* Add TLS extensions. */
|
||||||
TLSX_WriteResponse(ssl, output + idx, hello_retry_request);
|
TLSX_WriteResponse(ssl, output + idx, hello_retry_request);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user