forked from wolfSSL/wolfssl
adding DTLS retry timeout, added CYASSL pointer to recv/send callbacks
This commit is contained in:
30
src/ssl.c
30
src/ssl.c
@@ -185,6 +185,13 @@ int CyaSSL_get_fd(const CYASSL* ssl)
|
||||
}
|
||||
|
||||
|
||||
void CyaSSL_using_nonblock(CYASSL* ssl)
|
||||
{
|
||||
CYASSL_ENTER("CyaSSL_using_nonblock");
|
||||
ssl->options.usingNonblock = 1;
|
||||
}
|
||||
|
||||
|
||||
int CyaSSL_negotiate(CYASSL* ssl)
|
||||
{
|
||||
int err = SSL_FATAL_ERROR;
|
||||
@@ -2175,6 +2182,29 @@ int CyaSSL_set_cipher_list(CYASSL* ssl, const char* list)
|
||||
}
|
||||
|
||||
|
||||
int CyaSSL_dtls_get_current_timeout(CYASSL* ssl)
|
||||
{
|
||||
(void)ssl;
|
||||
|
||||
#ifdef CYASSL_DTLS
|
||||
return ssl->dtls_timeout;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void CyaSSL_dtls_got_timeout(CYASSL* ssl)
|
||||
{
|
||||
(void)ssl;
|
||||
|
||||
#ifdef CYASSL_DTLS
|
||||
if (ssl->dtls_timeout < 64)
|
||||
ssl->dtls_timeout *= 2;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/* client only parts */
|
||||
#ifndef NO_CYASSL_CLIENT
|
||||
|
||||
|
||||
Reference in New Issue
Block a user