Addressing PR comment

pull/435/head
Andras Fekete 2024-05-01 14:13:58 -04:00
parent 077ac687d7
commit 21b7c8e4fe
13 changed files with 39 additions and 26 deletions

View File

@ -80,10 +80,11 @@ int main(int argc, char** argv)
/* Create and initialize WOLFSSL_CTX */
#ifdef USE_TLSV13
if ((ctx = wolfSSL_CTX_new(wolfTLSv1_3_client_method())) == NULL) {
ctx = wolfSSL_CTX_new(wolfTLSv1_3_client_method());
#else
if ((ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method())) == NULL) {
ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method());
#endif
if (ctx == NULL) {
fprintf(stderr, "ERROR: failed to create WOLFSSL_CTX\n");
ret = -1;
goto exit;

View File

@ -133,10 +133,11 @@ int Security(int sock)
/* create and initialize WOLFSSL_CTX structure */
#ifdef USE_TLSV13
if ((ctx = wolfSSL_CTX_new(wolfTLSv1_3_client_method())) == NULL) {
ctx = wolfSSL_CTX_new(wolfTLSv1_3_client_method());
#else
if ((ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method())) == NULL) {
ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method());
#endif
if (ctx == NULL) {
printf("SSL_CTX_new error.\n");
ret = EXIT_FAILURE;
goto exit;

View File

@ -180,10 +180,11 @@ int main(int argc, char** argv)
/* Create and initialize WOLFSSL_CTX */
#ifdef USE_TLSV13
if ((ctx = wolfSSL_CTX_new(wolfTLSv1_3_client_method())) == NULL) {
ctx = wolfSSL_CTX_new(wolfTLSv1_3_client_method());
#else
if ((ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method())) == NULL) {
ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method());
#endif
if (ctx == NULL) {
fprintf(stderr, "ERROR: failed to create WOLFSSL_CTX\n");
ret = -1;
goto exit;

View File

@ -138,10 +138,11 @@ int main(int argc, char** argv)
/* Create and initialize WOLFSSL_CTX */
#ifdef USE_TLSV13
if ((ctx = wolfSSL_CTX_new(wolfTLSv1_3_client_method())) == NULL) {
ctx = wolfSSL_CTX_new(wolfTLSv1_3_client_method());
#else
if ((ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method())) == NULL) {
ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method());
#endif
if (ctx == NULL) {
fprintf(stderr, "ERROR: failed to create WOLFSSL_CTX\n");
ret = -1;
goto exit;

View File

@ -84,10 +84,11 @@ int main(int argc, char** argv)
/* Create and initialize WOLFSSL_CTX */
#ifdef USE_TLSV13
if ((ctx = wolfSSL_CTX_new(wolfTLSv1_3_client_method())) == NULL) {
ctx = wolfSSL_CTX_new(wolfTLSv1_3_client_method());
#else
if ((ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method())) == NULL) {
ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method());
#endif
if (ctx == NULL) {
fprintf(stderr, "ERROR: failed to create WOLFSSL_CTX\n");
ret = -1;
goto exit;

View File

@ -132,10 +132,11 @@ int main(int argc, char** argv)
/* Create and initialize WOLFSSL_CTX */
#ifdef USE_TLSV13
if ((ctx = wolfSSL_CTX_new(wolfTLSv1_3_client_method())) == NULL) {
ctx = wolfSSL_CTX_new(wolfTLSv1_3_client_method());
#else
if ((ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method())) == NULL) {
ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method());
#endif
if (ctx == NULL) {
fprintf(stderr, "ERROR: failed to create WOLFSSL_CTX\n");
ret = -1;
goto exit;

View File

@ -134,10 +134,11 @@ int main(int argc, char** argv)
/* Create and initialize WOLFSSL_CTX */
#ifdef USE_TLSV13
if ((ctx = wolfSSL_CTX_new(wolfTLSv1_3_client_method())) == NULL) {
ctx = wolfSSL_CTX_new(wolfTLSv1_3_client_method());
#else
if ((ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method())) == NULL) {
ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method());
#endif
if (ctx == NULL) {
fprintf(stderr, "ERROR: failed to create WOLFSSL_CTX\n");
return -1;
}

View File

@ -101,10 +101,11 @@ int main(int argc, char** argv)
/* Create and initialize WOLFSSL_CTX */
#ifdef USE_TLSV13
if ((ctx = wolfSSL_CTX_new(wolfTLSv1_3_client_method())) == NULL) {
ctx = wolfSSL_CTX_new(wolfTLSv1_3_client_method());
#else
if ((ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method())) == NULL) {
ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method());
#endif
if (ctx == NULL) {
fprintf(stderr, "ERROR: failed to create WOLFSSL_CTX\n");
ret = -1;
goto socket_cleanup;

View File

@ -178,10 +178,11 @@ int main()
/* Create and initialize WOLFSSL_CTX */
#ifdef USE_TLSV13
if ((ctx = wolfSSL_CTX_new(wolfTLSv1_3_server_method())) == NULL) {
ctx = wolfSSL_CTX_new(wolfTLSv1_3_server_method());
#else
if ((ctx = wolfSSL_CTX_new(wolfTLSv1_2_server_method())) == NULL) {
ctx = wolfSSL_CTX_new(wolfTLSv1_2_server_method());
#endif
if (ctx == NULL) {
fprintf(stderr, "ERROR: failed to create WOLFSSL_CTX\n");
ret = -1;
goto exit;

View File

@ -80,10 +80,11 @@ int main()
/* Create and initialize WOLFSSL_CTX */
#ifdef USE_TLSV13
if ((ctx = wolfSSL_CTX_new(wolfTLSv1_3_server_method())) == NULL) {
ctx = wolfSSL_CTX_new(wolfTLSv1_3_server_method());
#else
if ((ctx = wolfSSL_CTX_new(wolfTLSv1_2_server_method())) == NULL) {
ctx = wolfSSL_CTX_new(wolfTLSv1_2_server_method());
#endif
if (ctx == NULL) {
fprintf(stderr, "ERROR: failed to create WOLFSSL_CTX\n");
ret = -1;
goto exit;

View File

@ -132,10 +132,11 @@ int main()
/* Create and initialize WOLFSSL_CTX */
#ifdef USE_TLSV13
if ((ctx = wolfSSL_CTX_new(wolfTLSv1_3_server_method())) == NULL) {
ctx = wolfSSL_CTX_new(wolfTLSv1_3_server_method());
#else
if ((ctx = wolfSSL_CTX_new(wolfTLSv1_2_server_method())) == NULL) {
ctx = wolfSSL_CTX_new(wolfTLSv1_2_server_method());
#endif
if (ctx == NULL) {
fprintf(stderr, "ERROR: failed to create WOLFSSL_CTX\n");
ret = -1;
goto exit;

View File

@ -201,10 +201,11 @@ int main()
/* Create and initialize WOLFSSL_CTX */
#ifdef USE_TLSV13
if ((ctx = wolfSSL_CTX_new(wolfTLSv1_3_server_method())) == NULL) {
ctx = wolfSSL_CTX_new(wolfTLSv1_3_server_method());
#else
if ((ctx = wolfSSL_CTX_new(wolfTLSv1_2_server_method())) == NULL) {
ctx = wolfSSL_CTX_new(wolfTLSv1_2_server_method());
#endif
if (ctx == NULL) {
fprintf(stderr, "ERROR: failed to create WOLFSSL_CTX\n");
ret = -1;
goto exit;

View File

@ -81,10 +81,11 @@ int main()
/* Create and initialize WOLFSSL_CTX */
#ifdef USE_TLSV13
if ((ctx = wolfSSL_CTX_new(wolfTLSv1_3_server_method())) == NULL) {
ctx = wolfSSL_CTX_new(wolfTLSv1_3_server_method());
#else
if ((ctx = wolfSSL_CTX_new(wolfTLSv1_2_server_method())) == NULL) {
ctx = wolfSSL_CTX_new(wolfTLSv1_2_server_method());
#endif
if (ctx == NULL) {
fprintf(stderr, "ERROR: failed to create WOLFSSL_CTX\n");
ret = -1;
goto exit;