allow client to downgrade version with v23, make server downgrade more robust

This commit is contained in:
Todd A Ouska
2011-04-25 15:49:30 -07:00
parent 6c96166c48
commit 1ad10ffdc8
4 changed files with 85 additions and 20 deletions

View File

@@ -75,7 +75,7 @@ void client_test(void* args)
#if defined(CYASSL_DTLS)
method = DTLSv1_client_method();
#elif !defined(NO_TLS)
method = TLSv1_client_method();
method = SSLv23_client_method();
#else
method = SSLv3_client_method();
#endif

View File

@@ -122,11 +122,14 @@ THREAD_RETURN CYASSL_API echoserver_test(void* args)
SSL_set_fd(ssl, clientfd);
SetDH(ssl);
if (SSL_accept(ssl) != SSL_SUCCESS) {
printf("SSL_accept failed");
printf("SSL_accept failed\n");
SSL_free(ssl);
CloseSocket(clientfd);
continue;
}
#ifdef ECHO_OUT
showPeer(ssl);
#endif
while ( (echoSz = SSL_read(ssl, command, sizeof(command))) > 0) {