properly handle a DTLS handshake failure

early DTLS handshake failures would not terminate the read
loop and cause the remaining handshake bytes to be feed to
packet reader, causing an error assertion.

Rework the main read loop to terminate it when the read
event is not longer active and stop the read event on
handshake failure.

Also, make the DTLS handshake erorr message a bit more readable
by appending the WolfSSL error message to it.

Fixes issue #8.
This commit is contained in:
Andreas Schultz
2016-08-17 15:18:35 +02:00
parent 627ecd5a9e
commit de0ffd5153
4 changed files with 25 additions and 4 deletions

View File

@ -17,6 +17,7 @@ void wtp_free_discovery_response_array(void);
/* */
void wtp_teardown_connection(void);
void wtp_abort_connecting(void);
/* */
void wtp_socket_io_start(void);