summaryrefslogtreecommitdiff
path: root/test/clienthellotest.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2017-09-04 08:45:12 +0100
committerMatt Caswell <matt@openssl.org>2017-09-04 15:15:30 +0100
commit1d2491e20e1400def31eb1d1daea5583bfc7ea38 (patch)
treead4306ff548e9dddc9e08f0fc2713b4ab907254e /test/clienthellotest.c
parent3d85c7f408e54e1a0b367901534139ba5f1cad07 (diff)
downloadopenssl-new-1d2491e20e1400def31eb1d1daea5583bfc7ea38.tar.gz
Don't use ciphersuites for inflating the ClientHello in clienthellotest
clienthellotest tries to fill out the size of the ClientHello by adding extra ciphersuites in order to test the padding extension. This is unreliable because they are very dependent on configuration options. If we add too much data the test will fail! We were already also adding some dummy ALPN protocols to pad out the size, and it turns out that this is sufficient just in itself, so drop the extra ciphersuites. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/4331)
Diffstat (limited to 'test/clienthellotest.c')
-rw-r--r--test/clienthellotest.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/test/clienthellotest.c b/test/clienthellotest.c
index fbac8ea274..ee2d0ba274 100644
--- a/test/clienthellotest.c
+++ b/test/clienthellotest.c
@@ -90,16 +90,14 @@ static int test_client_hello(int currtest)
case TEST_PADDING_NOT_NEEDED:
SSL_CTX_set_options(ctx, SSL_OP_TLSEXT_PADDING);
/*
- * Add lots of ciphersuites so that the ClientHello is at least
+ * Add some dummy ALPN protocols so that the ClientHello is at least
* F5_WORKAROUND_MIN_MSG_LEN bytes long - meaning padding will be
- * needed. Also add some dummy ALPN protocols in case we still don't
- * have enough.
+ * needed.
*/
if (currtest == TEST_ADD_PADDING
- && (!TEST_true(SSL_CTX_set_cipher_list(ctx, "ALL"))
- || !TEST_false(SSL_CTX_set_alpn_protos(ctx,
- (unsigned char *)alpn_prots,
- sizeof(alpn_prots) - 1))))
+ && (!TEST_false(SSL_CTX_set_alpn_protos(ctx,
+ (unsigned char *)alpn_prots,
+ sizeof(alpn_prots) - 1))))
goto end;
break;