Skip to content

Commit

Permalink
fixed clang-format issues
Browse files Browse the repository at this point in the history
  • Loading branch information
trigpolynom committed Dec 8, 2023
1 parent 7a08da2 commit 3301d38
Show file tree
Hide file tree
Showing 11 changed files with 6,015 additions and 3,287 deletions.
374 changes: 248 additions & 126 deletions oqsprov/oqs_decode_der2key.c

Large diffs are not rendered by default.

683 changes: 344 additions & 339 deletions oqsprov/oqs_encode_key2any.c

Large diffs are not rendered by default.

440 changes: 300 additions & 140 deletions oqsprov/oqs_kmgmt.c

Large diffs are not rendered by default.

2,666 changes: 1,838 additions & 828 deletions oqsprov/oqs_prov.h

Large diffs are not rendered by default.

607 changes: 391 additions & 216 deletions oqsprov/oqsdecoders.inc

Large diffs are not rendered by default.

2,039 changes: 1,271 additions & 768 deletions oqsprov/oqsencoders.inc

Large diffs are not rendered by default.

1,223 changes: 853 additions & 370 deletions oqsprov/oqsprov.c

Large diffs are not rendered by default.

1,011 changes: 629 additions & 382 deletions oqsprov/oqsprov_capabilities.c

Large diffs are not rendered by default.

241 changes: 129 additions & 112 deletions oqsprov/oqsprov_keys.c

Large diffs are not rendered by default.

13 changes: 9 additions & 4 deletions test/oqs_test_hashnsign.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ static const EVP_MD *get_digest_for_algorithm(const char *alg_name)
return md;
}

static int test_hash_n_sign(const char *sigalg_name) {
static int test_hash_n_sign(const char *sigalg_name)
{
EVP_MD_CTX *mdctx = NULL;
EVP_PKEY_CTX *pkey_ctx = NULL;
EVP_PKEY *key = NULL;
Expand All @@ -71,7 +72,9 @@ static int test_hash_n_sign(const char *sigalg_name) {

const EVP_MD *md_type = get_digest_for_algorithm(sigalg_name);
if (!md_type) {
printf("Unsupported digest type for algorithm %s.\n Not failing over unsupported hash algs.", sigalg_name);
printf(
"Unsupported digest type for algorithm %s.\n Not failing over unsupported hash algs.",
sigalg_name);
return 1;
}

Expand Down Expand Up @@ -110,7 +113,8 @@ static int test_hash_n_sign(const char *sigalg_name) {
}

if (EVP_DigestSignFinal(mdctx, NULL, &siglen) <= 0) {
printf("EVP_DigestSignFinal (get length) failed for %s.\n", sigalg_name);
printf("EVP_DigestSignFinal (get length) failed for %s.\n",
sigalg_name);
testresult = 0;
goto cleanup;
}
Expand All @@ -123,7 +127,8 @@ static int test_hash_n_sign(const char *sigalg_name) {
}

if (EVP_DigestSignFinal(mdctx, sig, &siglen) <= 0) {
printf("EVP_DigestSignFinal (get signature) failed for %s.\n", sigalg_name);
printf("EVP_DigestSignFinal (get signature) failed for %s.\n",
sigalg_name);
testresult = 0;
goto cleanup;
}
Expand Down
5 changes: 3 additions & 2 deletions test/oqs_test_tlssig.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ static int test_oqs_tlssig(const char *sig_name)

if (!testresult) {
fprintf(stderr, "Failed to create TLS context pair.\n");
ERR_print_errors_fp(stderr); // Log SSL errors
ERR_print_errors_fp(stderr); // Log SSL errors
ret = -1;
goto err;
}
Expand All @@ -75,7 +75,8 @@ static int test_oqs_tlssig(const char *sig_name)
testresult = create_tls_connection(serverssl, clientssl, SSL_ERROR_NONE);
if (!testresult) {
fprintf(stderr, "TLS handshake failed for %s.\n", sig_name);
int ssl_err = SSL_get_error(clientssl, testresult); // Or serverssl, depending on which failed
int ssl_err = SSL_get_error(
clientssl, testresult); // Or serverssl, depending on which failed
fprintf(stderr, "SSL error code: %d\n", ssl_err);
ERR_print_errors_fp(stderr); // Detailed SSL error logging
ret = -5;
Expand Down

0 comments on commit 3301d38

Please sign in to comment.