- if (ctx == NULL) {
- printf("Failed to allocate SSL_CTX\n");
- goto end_md;
- }
- if (!SSL_CTX_set_min_proto_version(ctx, DTLS1_BAD_VER)) {
- printf("SSL_CTX_set_min_proto_version() failed\n");
- goto end_ctx;
- }
- if (!SSL_CTX_set_max_proto_version(ctx, DTLS1_BAD_VER)) {
- printf("SSL_CTX_set_max_proto_version() failed\n");
- goto end_ctx;
- }
-
- if (!SSL_CTX_set_cipher_list(ctx, "AES128-SHA")) {
- printf("SSL_CTX_set_cipher_list() failed\n");
- goto end_ctx;
- }
+ if (!TEST_ptr(ctx)
+ || !TEST_true(SSL_CTX_set_min_proto_version(ctx, DTLS1_BAD_VER))
+ || !TEST_true(SSL_CTX_set_max_proto_version(ctx, DTLS1_BAD_VER))
+ || !TEST_true(SSL_CTX_set_cipher_list(ctx, "AES128-SHA")))
+ goto end;