summaryrefslogtreecommitdiff
path: root/src/regress/lib
diff options
context:
space:
mode:
authorjsing <>2020-09-16 15:43:08 +0000
committerjsing <>2020-09-16 15:43:08 +0000
commite31933777a3a59b3ebc949918eb158166e7d9c1d (patch)
treee8dd72e5c7764d900919d2d4bfeaf4e1c9dcbeeb /src/regress/lib
parentbac34e6a9c63e34632ddd7154da5de3ff012e394 (diff)
downloadopenbsd-e31933777a3a59b3ebc949918eb158166e7d9c1d.tar.gz
openbsd-e31933777a3a59b3ebc949918eb158166e7d9c1d.tar.bz2
openbsd-e31933777a3a59b3ebc949918eb158166e7d9c1d.zip
Make cipher_set_test() log failures and continue, rather than aborting.
Diffstat (limited to 'src/regress/lib')
-rw-r--r--src/regress/lib/libssl/ciphers/cipherstest.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/regress/lib/libssl/ciphers/cipherstest.c b/src/regress/lib/libssl/ciphers/cipherstest.c
index 34ac96e48c..94e1a8c73b 100644
--- a/src/regress/lib/libssl/ciphers/cipherstest.c
+++ b/src/regress/lib/libssl/ciphers/cipherstest.c
@@ -398,7 +398,7 @@ cipher_set_test()
398 SSL_CIPHER *cipher; 398 SSL_CIPHER *cipher;
399 SSL_CTX *ctx = NULL; 399 SSL_CTX *ctx = NULL;
400 SSL *ssl = NULL; 400 SSL *ssl = NULL;
401 int failed = 1; 401 int failed = 0;
402 size_t i; 402 size_t i;
403 int j; 403 int j;
404 404
@@ -448,26 +448,18 @@ cipher_set_test()
448 fprintf(stderr, "FAIL: test %zu - got cipher %d with " 448 fprintf(stderr, "FAIL: test %zu - got cipher %d with "
449 "id %lx, want %lx\n", i, j, 449 "id %lx, want %lx\n", i, j,
450 SSL_CIPHER_get_id(cipher), cst->cids[j]); 450 SSL_CIPHER_get_id(cipher), cst->cids[j]);
451 goto failed; 451 failed |= 1;
452 } 452 }
453 if (cst->cids[j] != 0) { 453 if (cst->cids[j] != 0) {
454 fprintf(stderr, "FAIL: test %zu - got %d ciphers, " 454 fprintf(stderr, "FAIL: test %zu - got %d ciphers, "
455 "expected more", i, sk_SSL_CIPHER_num(ciphers)); 455 "expected more", i, sk_SSL_CIPHER_num(ciphers));
456 goto failed; 456 failed |= 1;
457 } 457 }
458 458
459 SSL_CTX_free(ctx); 459 SSL_CTX_free(ctx);
460 ctx = NULL;
461 SSL_free(ssl); 460 SSL_free(ssl);
462 ssl = NULL;
463 } 461 }
464 462
465 failed = 0;
466
467 failed:
468 SSL_CTX_free(ctx);
469 SSL_free(ssl);
470
471 return failed; 463 return failed;
472} 464}
473 465