1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-15 07:43:50 +00:00

Fixed TLS 1.3 state machine.

This commit is contained in:
Ylian Saint-Hilaire
2020-01-20 22:49:10 -08:00
parent 90888b711f
commit cc3fe1461e
2 changed files with 6 additions and 3 deletions

View File

@@ -1215,7 +1215,9 @@ void ILibProcessAsyncSocket(struct ILibAsyncSocketModule *Reader, int pendingRea
}
SSL_TRACE2("SSL_handshake()");
}
else
// Even if we get completed the TLS handshake, we must still read if data remains, this is possible with TLS 1.3
if ((Reader->TLSHandshakeCompleted == 1) && (Reader->readBioBuffer->length > 0))
{
SSL_TRACE1("SSL_read()");
while ((j = SSL_read(Reader->ssl, Reader->buffer + Reader->EndPointer, Reader->MallocSize - Reader->EndPointer))>0)