aboutsummaryrefslogtreecommitdiff
path: root/test/cipherlist_test.c
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2017-03-22 14:27:55 +1000
committerPauli <paul.dale@oracle.com>2017-03-29 08:51:43 +1000
commit2fae041d6c507315a619e2f29bff86e44cc1d0a1 (patch)
tree916c82cafe8b198da5ca777b29ea4fab3f036f5b /test/cipherlist_test.c
parenta6ac1ed686346d2164c16446624c973e51d3ae92 (diff)
downloadopenssl-2fae041d6c507315a619e2f29bff86e44cc1d0a1.zip
openssl-2fae041d6c507315a619e2f29bff86e44cc1d0a1.tar.gz
openssl-2fae041d6c507315a619e2f29bff86e44cc1d0a1.tar.bz2
Test infrastructure additions.
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3011)
Diffstat (limited to 'test/cipherlist_test.c')
-rw-r--r--test/cipherlist_test.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/test/cipherlist_test.c b/test/cipherlist_test.c
index 0c344c9..0013994 100644
--- a/test/cipherlist_test.c
+++ b/test/cipherlist_test.c
@@ -136,18 +136,14 @@ static int test_default_cipherlist(SSL_CTX *ctx)
OPENSSL_assert(ciphers != NULL);
num_expected_ciphers = OSSL_NELEM(default_ciphers_in_order);
num_ciphers = sk_SSL_CIPHER_num(ciphers);
- if (num_ciphers != num_expected_ciphers) {
- fprintf(stderr, "Expected %d supported ciphers, got %d.\n",
- num_expected_ciphers, num_ciphers);
+ if (!TEST_int_eq(num_ciphers, num_expected_ciphers))
goto err;
- }
for (i = 0; i < num_ciphers; i++) {
expected_cipher_id = default_ciphers_in_order[i];
cipher_id = SSL_CIPHER_get_id(sk_SSL_CIPHER_value(ciphers, i));
- if (cipher_id != expected_cipher_id) {
- fprintf(stderr, "Wrong cipher at position %d: expected %x, "
- "got %x\n", i, expected_cipher_id, cipher_id);
+ if (!TEST_int_eq(cipher_id, expected_cipher_id)) {
+ TEST_info("Wrong cipher at position %d", i);
goto err;
}
}