summaryrefslogtreecommitdiff
path: root/examples/openssl/client.c
diff options
context:
space:
mode:
authorRobert Swiecki <robert@swiecki.net>2018-04-28 05:17:26 +0200
committerRobert Swiecki <robert@swiecki.net>2018-04-28 05:17:26 +0200
commita7528c9a9fb87b41b21a4ea0f5e7d8e406fb8723 (patch)
tree445b4285b9a4503ec45e26c6c1feebd8eea19053 /examples/openssl/client.c
parent801f94d4455fb42f3c7fdb9d49e8216ee3202bcf (diff)
downloadhonggfuzz-a7528c9a9fb87b41b21a4ea0f5e7d8e406fb8723.tar.gz
examples/openssl: add more options for boringssl
Diffstat (limited to 'examples/openssl/client.c')
-rw-r--r--examples/openssl/client.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/examples/openssl/client.c b/examples/openssl/client.c
index 977942a8..8d0ddf6d 100644
--- a/examples/openssl/client.c
+++ b/examples/openssl/client.c
@@ -497,11 +497,13 @@ int LLVMFuzzerInitialize(int* argc, char*** argv) {
SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, NULL);
SSL_CTX_set_verify_depth(ctx, 10);
-#if !defined(HF_SSL_IS_LIBRESSL) && !defined(HF_SSL_IS_OPENSSL_GE_1_1)
+#if defined(HF_SSL_IS_BORINGSSL)
SSL_CTX_set_psk_client_callback(ctx, psk_callback);
ret = SSL_CTX_use_psk_identity_hint(ctx, "ABCDEFUZZ");
assert(ret == 1);
-#endif /* !defined(HF_SSL_IS_LIBRESSL) */
+
+ SSL_CTX_set_early_data_enabled(ctx, 1);
+#endif /* defined(HF_SSL_IS_BORINGSSL) */
SSL_CTX_set_ecdh_auto(ctx, 1);
@@ -523,6 +525,10 @@ int LLVMFuzzerTestOneInput(const uint8_t* buf, size_t len) {
SSL* client = SSL_new(ctx);
SSL_set_tlsext_host_name(client, "localhost");
+#if defined(HF_SSL_IS_BORINGSSL)
+ SSL_set_renegotiate_mode(client, ssl_renegotiate_freely);
+#endif /* defined(HF_SSL_IS_BORINGSSL) */
+
#if defined(HF_SSL_IS_OPENSSL_GE_1_1) || defined(HF_SSL_IS_BORINGSSL)
SSL_set_min_proto_version(client, SSL3_VERSION);
SSL_set_max_proto_version(client, TLS1_3_VERSION);