summaryrefslogtreecommitdiffstats
path: root/test/handshake_helper.c
diff options
context:
space:
mode:
authorTomas Mraz <tmraz@fedoraproject.org>2020-06-05 10:50:25 +0200
committerTomas Mraz <tmraz@fedoraproject.org>2020-06-09 14:11:20 +0200
commitcd4afec69f13e283f74d59f1c97e15db6803bdcb (patch)
tree52afea44b7d4e332455cce9afa10ae5e0f8cf9a8 /test/handshake_helper.c
parent11d3235e2b5a1dc9f48c040b1f1b6bea86ffc745 (diff)
Add a test for renegotiation with EXTMS dropped
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/12045)
Diffstat (limited to 'test/handshake_helper.c')
-rw-r--r--test/handshake_helper.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/handshake_helper.c b/test/handshake_helper.c
index 32aa12c466..030073289a 100644
--- a/test/handshake_helper.c
+++ b/test/handshake_helper.c
@@ -938,16 +938,24 @@ static void do_reneg_setup_step(const SSL_TEST_CTX *test_ctx, PEER *peer)
if (SSL_is_server(peer->ssl)) {
ret = SSL_renegotiate(peer->ssl);
} else {
+ int full_reneg = 0;
+
+ if (test_ctx->extra.client.no_extms_on_reneg) {
+ SSL_set_options(peer->ssl, SSL_OP_NO_EXTENDED_MASTER_SECRET);
+ full_reneg = 1;
+ }
if (test_ctx->extra.client.reneg_ciphers != NULL) {
if (!SSL_set_cipher_list(peer->ssl,
test_ctx->extra.client.reneg_ciphers)) {
peer->status = PEER_ERROR;
return;
}
+ full_reneg = 1;
+ }
+ if (full_reneg)
ret = SSL_renegotiate(peer->ssl);
- } else {
+ else
ret = SSL_renegotiate_abbreviated(peer->ssl);
- }
}
if (!ret) {
peer->status = PEER_ERROR;