]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Make client and server fuzzer support all ciphers
authorKurt Roeckx <kurt@roeckx.be>
Thu, 15 Dec 2016 19:11:18 +0000 (20:11 +0100)
committerKurt Roeckx <kurt@roeckx.be>
Fri, 16 Dec 2016 00:08:22 +0000 (01:08 +0100)
Also send a SNI extension in the client so the fuzzer can react to it.

Reviewed-by: Rich Salz <rsalz@openssl.org>
GH: #2088

fuzz/client.c
fuzz/server.c

index 391e0cce9fae2e4d681d4c30daf5e5400ea2f1e6..d4dffd7c3ae294cffe2fd9ad8cfac523bcc590d9 100644 (file)
@@ -63,6 +63,8 @@ int FuzzerTestOneInput(const uint8_t *buf, size_t len)
     ctx = SSL_CTX_new(SSLv23_method());
 
     client = SSL_new(ctx);
+    OPENSSL_assert(SSL_set_cipher_list(client, "ALL:eNULL:@SECLEVEL=0") == 1);
+    SSL_set_tlsext_host_name(client, "localhost");
     in = BIO_new(BIO_s_mem());
     out = BIO_new(BIO_s_mem());
     SSL_set_bio(client, in, out);
index 3b5df9dc4215c95aef4fa03df6b6e36522723f21..c2c54b9e25e22f9908b20a96172b81698af1fe1b 100644 (file)
@@ -258,6 +258,8 @@ int FuzzerTestOneInput(const uint8_t *buf, size_t len)
     X509_free(cert);
 
     server = SSL_new(ctx);
+    ret = SSL_set_cipher_list(server, "ALL:eNULL:@SECLEVEL=0");
+    OPENSSL_assert(ret == 1);
     in = BIO_new(BIO_s_mem());
     out = BIO_new(BIO_s_mem());
     SSL_set_bio(server, in, out);