Merge pull request #1914 from kaleb-himes/FIX_x_OPT_SERVER

Fix -x option in server to continue in event of error (R)
This commit is contained in:
JacobBarthelmeh
2018-11-07 10:11:27 -07:00
committed by GitHub

View File

@ -1826,17 +1826,17 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
err = SSL_get_error(ssl, 0); err = SSL_get_error(ssl, 0);
printf("SSL_accept error %d, %s\n", err, printf("SSL_accept error %d, %s\n", err,
ERR_error_string(err, buffer)); ERR_error_string(err, buffer));
/* cleanup */ if (!exitWithRet) {
SSL_free(ssl); ssl = NULL;
SSL_CTX_free(ctx); ctx = NULL;
CloseSocket(clientfd);
CloseSocket(sockfd);
if (!exitWithRet)
err_sys_ex(runWithErrors, "SSL_accept failed"); err_sys_ex(runWithErrors, "SSL_accept failed");
} else {
((func_args*)args)->return_code = err; /* cleanup */
goto exit; SSL_free(ssl); ssl = NULL;
SSL_CTX_free(ctx); ctx = NULL;
CloseSocket(clientfd);
CloseSocket(sockfd);
((func_args*)args)->return_code = err;
goto exit;
}
} }
showPeerEx(ssl, lng_index); showPeerEx(ssl, lng_index);