X-Git-Url: https://git.openssl.org/?a=blobdiff_plain;f=test%2Fdtlstest.c;fp=test%2Fdtlstest.c;h=f84f2c1299a0351e6410d15e1f16965be8af0cef;hb=4000827fdbf3f6d70949186fdd2bc57638500885;hp=bb781604fa2c8f8936e92c1edfd737c6b7b3b844;hpb=6d6b295ac39fcb0461f25fda69983d2dbb75f8f1;p=openssl.git diff --git a/test/dtlstest.c b/test/dtlstest.c index bb781604fa..f84f2c1299 100644 --- a/test/dtlstest.c +++ b/test/dtlstest.c @@ -522,6 +522,93 @@ static int test_swap_epoch(void) return testresult; } +/* + * Test that swapping an app data record so that it is received before the + * Finished message still works. + */ +static int test_swap_app_data(void) +{ + SSL_CTX *sctx = NULL, *cctx = NULL; + SSL *sssl = NULL, *cssl = NULL; + int testresult = 0; + BIO *bio; + char msg[] = { 0x00, 0x01, 0x02, 0x03 }; + char buf[10]; + + if (!TEST_true(create_ssl_ctx_pair(NULL, DTLS_server_method(), + DTLS_client_method(), + DTLS1_VERSION, 0, + &sctx, &cctx, cert, privkey))) + return 0; + +#ifndef OPENSSL_NO_DTLS1_2 + if (!TEST_true(SSL_CTX_set_cipher_list(cctx, "AES128-SHA"))) + goto end; +#else + /* Default sigalgs are SHA1 based in