Fix for async post handshake auth. The re-handshake was not resetting the processReply state.

This commit is contained in:
David Garske
2020-12-17 14:58:46 -08:00
parent 420a040774
commit 73a5ee5ffb
2 changed files with 11 additions and 7 deletions

View File

@ -17137,7 +17137,7 @@ size_t wolfSSL_get_client_random(const WOLFSSL* ssl, unsigned char* out,
ssl->options.acceptState = ACCEPT_BEGIN;
ssl->options.handShakeState = NULL_STATE;
ssl->options.handShakeDone = 0;
/* ssl->options.processReply = doProcessInit; */
ssl->options.processReply = 0; /* doProcessInit */
ssl->keys.encryptionOn = 0;
XMEMSET(&ssl->msgsReceived, 0, sizeof(ssl->msgsReceived));

View File

@ -7222,10 +7222,14 @@ int DoTls13HandShakeMsgType(WOLFSSL* ssl, byte* input, word32* inOutIdx,
ssl->options.clientState = CLIENT_HELLO_COMPLETE;
ssl->options.connectState = FIRST_REPLY_DONE;
ssl->options.handShakeState = CLIENT_HELLO_COMPLETE;
ssl->options.processReply = 0; /* doProcessInit */
if (wolfSSL_connect_TLSv13(ssl) != SSL_SUCCESS)
if (wolfSSL_connect_TLSv13(ssl) != WOLFSSL_SUCCESS) {
ret = ssl->error;
if (ret != WC_PENDING_E)
ret = POST_HAND_AUTH_ERROR;
}
}
#endif
}
#endif /* NO_WOLFSSL_CLIENT */