Skip to content

Commit

Permalink
formatting fixed
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Baentsch <[email protected]>
  • Loading branch information
baentsch committed Dec 9, 2024
1 parent bd4148d commit f4c93cf
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
3 changes: 2 additions & 1 deletion test/oqs_test_groups.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ static int test_oqs_groups(const char *group_name, int dtls_flag) {
printf("Not testing disabled algorithm %s.\n", group_name);
return 1;
}
testresult = create_tls1_3_ctx_pair(libctx, &sctx, &cctx, cert, privkey, dtls_flag);
testresult =
create_tls1_3_ctx_pair(libctx, &sctx, &cctx, cert, privkey, dtls_flag);
if (!testresult) {
ret = -1;
goto err;
Expand Down
4 changes: 2 additions & 2 deletions test/oqs_test_tlssig.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ static int test_oqs_tlssig(const char *sig_name, int dtls_flag) {
goto err;
}

testresult =
create_tls1_3_ctx_pair(libctx, &sctx, &cctx, certpath, privkeypath, dtls_flag);
testresult = create_tls1_3_ctx_pair(libctx, &sctx, &cctx, certpath,
privkeypath, dtls_flag);

if (!testresult) {
ret = -1;
Expand Down
22 changes: 10 additions & 12 deletions test/tlstest_helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ int create_tls1_3_ctx_pair(OSSL_LIB_CTX *libctx, SSL_CTX **sctx, SSL_CTX **cctx,
if (dtls_flag) {
serverctx = SSL_CTX_new_ex(libctx, NULL, DTLS_server_method());
clientctx = SSL_CTX_new_ex(libctx, NULL, DTLS_client_method());
}
else {
} else {
serverctx = SSL_CTX_new_ex(libctx, NULL, TLS_server_method());
clientctx = SSL_CTX_new_ex(libctx, NULL, TLS_client_method());
}
Expand All @@ -63,17 +62,16 @@ int create_tls1_3_ctx_pair(OSSL_LIB_CTX *libctx, SSL_CTX **sctx, SSL_CTX **cctx,

SSL_CTX_set_options(serverctx, SSL_OP_ALLOW_CLIENT_RENEGOTIATION);
if (dtls_flag) {
if (!SSL_CTX_set_min_proto_version(serverctx, DTLS1_3_VERSION)
|| !SSL_CTX_set_max_proto_version(serverctx, DTLS1_3_VERSION)
|| !SSL_CTX_set_min_proto_version(clientctx, DTLS1_3_VERSION)
|| !SSL_CTX_set_max_proto_version(clientctx, DTLS1_3_VERSION))
if (!SSL_CTX_set_min_proto_version(serverctx, DTLS1_3_VERSION) ||
!SSL_CTX_set_max_proto_version(serverctx, DTLS1_3_VERSION) ||
!SSL_CTX_set_min_proto_version(clientctx, DTLS1_3_VERSION) ||
!SSL_CTX_set_max_proto_version(clientctx, DTLS1_3_VERSION))
goto err;
}
else {
if (!SSL_CTX_set_min_proto_version(serverctx, TLS1_3_VERSION)
|| !SSL_CTX_set_max_proto_version(serverctx, TLS1_3_VERSION)
|| !SSL_CTX_set_min_proto_version(clientctx, TLS1_3_VERSION)
|| !SSL_CTX_set_max_proto_version(clientctx, TLS1_3_VERSION))
} else {
if (!SSL_CTX_set_min_proto_version(serverctx, TLS1_3_VERSION) ||
!SSL_CTX_set_max_proto_version(serverctx, TLS1_3_VERSION) ||
!SSL_CTX_set_min_proto_version(clientctx, TLS1_3_VERSION) ||
!SSL_CTX_set_max_proto_version(clientctx, TLS1_3_VERSION))
goto err;
}

Expand Down

0 comments on commit f4c93cf

Please sign in to comment.