Fix TCP with Timeout

wolfSSL remains agnostic to network socket behavior be it blocking or non-blocking. The non-blocking flag was meant for the default EmbedRecvFrom() callback for use with UDP to assist the timing of the handshake.

1. Deprecate wolfSSL_set_using_nonblock() and wolfSSL_get_using_nonblock() for use with TLS sockets. They become don't-cares when used with TLS sessions.
2. Added functions wolfSSL_dtls_set_using_nonblock() and wolfSSL_dtls_get_using_nonblock().
3. Removed a test case from EmbedReceive() that only applied to UDP.
4. Removed the checks for non-blocking sockets from EmbedReceive().
5. Socket timeouts only apply to DTLS sessions.
This commit is contained in:
John Safranek
2018-05-23 11:29:16 -07:00
parent d8c33c5551
commit b1ed852f36
7 changed files with 111 additions and 100 deletions

View File

@@ -485,7 +485,6 @@
#define CyaDTLSv1_2_client_method wolfDTLSv1_2_client_method
#define CyaDTLSv1_2_server_method wolfDTLSv1_2_server_method
#define CyaSSL_set_group_messages wolfSSL_set_group_messages
#define CyaSSL_set_using_nonblock wolfSSL_set_using_nonblock
#define CyaSSL_CTX_set_cipher_list wolfSSL_CTX_set_cipher_list
#define CyaSSL_CTX_set_group_messages wolfSSL_CTX_set_group_messages
#define CyaSSL_CTX_set_session_cache_mode wolfSSL_CTX_set_session_cache_mode
@@ -623,6 +622,7 @@
#define CyaSSL_dtls_get_peer wolfSSL_dtls_get_peer
#define CyaSSL_dtls_got_timeout wolfSSL_dtls_got_timeout
#define CyaSSL_dtls_get_current_timeout wolfSSL_dtls_get_current_timeout
#define CyaSSL_set_using_nonblock wolfSSL_dtls_set_using_nonblock
/* Certificate Manager */
#define CyaSSL_CertManagerNew wolfSSL_CertManagerNew