adding DTLS retry timeout, added CYASSL pointer to recv/send callbacks

This commit is contained in:
John Safranek
2012-09-06 22:41:55 -07:00
parent 3361f7b7fe
commit 407397e8be
6 changed files with 76 additions and 11 deletions

View File

@@ -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