GH1537: Avoid double-free in the EVP_PKEY API
[openssl.git] / test / ssl_test_ctx_test.c
index 60bd573fbd9603bf15a8e1eadaac3854c439e03c..0f321c60f3332910cbeed6adac8f12257a1abd05 100644 (file)
@@ -83,6 +83,12 @@ static int SSL_TEST_SERVER_CONF_equal(SSL_TEST_SERVER_CONF *server,
                 server->broken_session_ticket, server2->broken_session_ticket);
         return 0;
     }
+    if (server->cert_status != server2->cert_status) {
+        fprintf(stderr, "CertStatus mismatch: %s vs %s.\n",
+                ssl_certstatus_name(server->cert_status),
+                ssl_certstatus_name(server2->cert_status));
+        return 0;
+    }
     return 1;
 }
 
@@ -109,6 +115,17 @@ static int SSL_TEST_CTX_equal(SSL_TEST_CTX *ctx, SSL_TEST_CTX *ctx2)
                 ssl_handshake_mode_name(ctx2->handshake_mode));
         return 0;
     }
+    if (ctx->app_data_size != ctx2->app_data_size) {
+        fprintf(stderr, "ApplicationData mismatch: %d vs %d.\n",
+                ctx->app_data_size, ctx2->app_data_size);
+        return 0;
+    }
+
+    if (ctx->max_fragment_size != ctx2->max_fragment_size) {
+        fprintf(stderr, "MaxFragmentSize mismatch: %d vs %d.\n",
+                ctx->max_fragment_size, ctx2->max_fragment_size);
+        return 0;
+    }
 
     if (!SSL_TEST_EXTRA_CONF_equal(&ctx->extra, &ctx2->extra)) {
         fprintf(stderr, "Extra conf mismatch.\n");
@@ -240,6 +257,8 @@ static int test_good_configuration()
     fixture.test_section = "ssltest_good";
     fixture.expected_ctx->method = SSL_TEST_METHOD_DTLS;
     fixture.expected_ctx->handshake_mode = SSL_TEST_HANDSHAKE_RESUME;
+    fixture.expected_ctx->app_data_size = 1024;
+    fixture.expected_ctx->max_fragment_size = 2048;
 
     fixture.expected_ctx->expected_result = SSL_TEST_SERVER_FAIL;
     fixture.expected_ctx->expected_client_alert = SSL_AD_UNKNOWN_CA;