refactoring

This commit is contained in:
JacobBarthelmeh
2014-07-17 15:00:40 -06:00
parent 7eb8f571ed
commit b77a1fdbbb
7 changed files with 505 additions and 294 deletions
+10
View File
@@ -611,6 +611,7 @@ THREAD_RETURN CYASSL_THREAD client_test(void* args)
#endif
ssl = CyaSSL_new(ctx);
if (ssl == NULL)
err_sys("unable to get SSL object");
if (doDTLS) {
@@ -622,6 +623,15 @@ THREAD_RETURN CYASSL_THREAD client_test(void* args)
else {
tcp_connect(&sockfd, host, port, 0);
}
#ifdef HAVE_POLY1305
/* use old poly to connect with google server */
if (!XMEMCMP(domain, "www.google.com", 15)) {
if (CyaSSL_use_old_poly(ssl, 1) != 0)
err_sys("unable to set to old poly");
}
#endif
CyaSSL_set_fd(ssl, sockfd);
#ifdef HAVE_CRL
if (CyaSSL_EnableCRL(ssl, CYASSL_CRL_CHECKALL) != SSL_SUCCESS)