summaryrefslogtreecommitdiff
path: root/test/ssl_test_ctx_test.c
diff options
context:
space:
mode:
authorEmilia Kasper <emilia@openssl.org>2016-08-16 15:11:08 +0200
committerEmilia Kasper <emilia@openssl.org>2016-08-18 12:46:00 +0200
commit6dc9974547427261db25758612b6a570083d52e6 (patch)
tree4dfaa8518da53208c3f109a3062feb540f6c742e /test/ssl_test_ctx_test.c
parent9d8c2dfe14cb371d242c04a52182aa0aee25ed18 (diff)
downloadopenssl-new-6dc9974547427261db25758612b6a570083d52e6.tar.gz
Port multi-buffer tests
Make maximum fragment length configurable and add various fragmentation tests, in addition to the existing multi-buffer tests. Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'test/ssl_test_ctx_test.c')
-rw-r--r--test/ssl_test_ctx_test.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ssl_test_ctx_test.c b/test/ssl_test_ctx_test.c
index f110bd1ec6..b54d7eab36 100644
--- a/test/ssl_test_ctx_test.c
+++ b/test/ssl_test_ctx_test.c
@@ -115,6 +115,12 @@ static int SSL_TEST_CTX_equal(SSL_TEST_CTX *ctx, SSL_TEST_CTX *ctx2)
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");
return 0;
@@ -246,6 +252,7 @@ static int test_good_configuration()
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;