summaryrefslogtreecommitdiff
path: root/examples/openssl/client.c
diff options
context:
space:
mode:
authorRobert Swiecki <robert@swiecki.net>2017-11-09 02:52:49 +0100
committerRobert Swiecki <robert@swiecki.net>2017-11-09 02:52:49 +0100
commit3f06503a77e0801a34b8d87305ab59d11b4063a7 (patch)
tree8a1fc613eed4ef77e2ae0b9d21a80857a292f393 /examples/openssl/client.c
parentb0e261a0840d94855d3986bac47319108cd12f67 (diff)
downloadhonggfuzz-3f06503a77e0801a34b8d87305ab59d11b4063a7.tar.gz
examples/openssl: use HF_SSL_IS_OPENSSL_GE_1_1 which allows to compile with openssl-1.0.2
Diffstat (limited to 'examples/openssl/client.c')
-rw-r--r--examples/openssl/client.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/openssl/client.c b/examples/openssl/client.c
index 3f888fcd..999eb764 100644
--- a/examples/openssl/client.c
+++ b/examples/openssl/client.c
@@ -537,28 +537,28 @@ int LLVMFuzzerTestOneInput(const uint8_t* buf, size_t len)
BIO_set_fd(out, 1, BIO_NOCLOSE);
SSL_set_bio(client, in, out);
-#if defined(HF_SSL_IS_OPENSSL)
+#if defined(HF_SSL_IS_OPENSSL_GE_1_1)
SSL_enable_ct(client, SSL_CT_VALIDATION_PERMISSIVE);
SSL_set_dh_auto(client, 1);
SSL_set_max_early_data(client, 128);
static const uint8_t edata_buf[128] = { 1, 0 };
size_t written = 0;
SSL_write_early_data(client, edata_buf, sizeof(edata_buf), &written);
-#endif // defined(HF_SSL_IS_OPENSSL)
+#endif // defined(HF_SSL_IS_OPENSSL_GE_1_1)
-#if !defined(HF_SSL_IS_LIBRESSL)
+#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);
-#endif // !defined(HF_SSL_IS_LIBRESSL)
+#endif // defined(HF_SSL_IS_OPENSSL_GE_1_1) || defined(HF_SSL_IS_BORINGSSL)
/* Try it two times to test SSL_clear() */
for (unsigned i = 0; i < 2; i++) {
if (SSL_connect(client) == 1) {
uint8_t tmp[1024 * 1024];
-#if defined(HF_SSL_IS_OPENSSL)
+#if defined(HF_SSL_IS_OPENSSL_GE_1_1)
size_t readbytes = 0;
SSL_read_early_data(client, tmp, sizeof(tmp), &readbytes);
-#endif // defined(HF_SSL_IS_OPENSSL)
+#endif // defined(HF_SSL_IS_OPENSSL_GE_1_1)
X509* peer;
if ((peer = SSL_get_peer_certificate(client)) != NULL) {
SSL_get_verify_result(client);