Commit 4e995479 authored by Kurt Roeckx's avatar Kurt Roeckx
Browse files

Make client and server fuzzer support all ciphers



Also send a SNI extension in the client so the fuzzer can react to it.

Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
GH: #2088
parent e104d01d
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -63,6 +63,8 @@ int FuzzerTestOneInput(const uint8_t *buf, size_t len)
    ctx = SSL_CTX_new(SSLv23_method());
    ctx = SSL_CTX_new(SSLv23_method());


    client = SSL_new(ctx);
    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());
    in = BIO_new(BIO_s_mem());
    out = BIO_new(BIO_s_mem());
    out = BIO_new(BIO_s_mem());
    SSL_set_bio(client, in, out);
    SSL_set_bio(client, in, out);
+2 −0
Original line number Original line Diff line number Diff line
@@ -258,6 +258,8 @@ int FuzzerTestOneInput(const uint8_t *buf, size_t len)
    X509_free(cert);
    X509_free(cert);


    server = SSL_new(ctx);
    server = SSL_new(ctx);
    ret = SSL_set_cipher_list(server, "ALL:eNULL:@SECLEVEL=0");
    OPENSSL_assert(ret == 1);
    in = BIO_new(BIO_s_mem());
    in = BIO_new(BIO_s_mem());
    out = BIO_new(BIO_s_mem());
    out = BIO_new(BIO_s_mem());
    SSL_set_bio(server, in, out);
    SSL_set_bio(server, in, out);