- ciphers = SSL_CTX_get_ciphers(cctx);
- if (ciphers == NULL || sk_SSL_CIPHER_num(ciphers) != 1) {
- printf("Unexpected ciphers set\n");
- goto end;
- }
- currcipher = sk_SSL_CIPHER_value(ciphers, 0);
- if (currcipher == NULL) {
- printf("Failed getting the current cipher\n");
+ if (!TEST_true(SSL_CTX_set_cipher_list(cctx, cipher_list[testidx]))
+ || !TEST_true(SSL_CTX_set_ciphersuites(cctx, ""))
+ || !TEST_ptr(ciphers = SSL_CTX_get_ciphers(cctx))
+ || !TEST_int_eq(sk_SSL_CIPHER_num(ciphers), 1)
+ || !TEST_ptr(currcipher = sk_SSL_CIPHER_value(ciphers, 0)))