Blame SOURCES/bz1688892-fix-openssl-init-config-check.patch

6a7e4c
From 1f2b558da9f631a635e9b099b455696b1903bee4 Mon Sep 17 00:00:00 2001
6a7e4c
From: Quentin Armitage <quentin@armitage.org.uk>
6a7e4c
Date: Fri, 15 Mar 2019 00:12:19 +0000
6a7e4c
Subject: [PATCH 3/3] Fix some configure tested checks for OPENSSL_init_crypto
6a7e4c
6a7e4c
Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
6a7e4c
---
6a7e4c
 genhash/ssl.c                | 6 +++---
6a7e4c
 keepalived/check/check_ssl.c | 6 +++---
6a7e4c
 2 files changed, 6 insertions(+), 6 deletions(-)
6a7e4c
6a7e4c
diff --git a/genhash/ssl.c b/genhash/ssl.c
6a7e4c
index 96f51201..0574675a 100644
6a7e4c
--- a/genhash/ssl.c
6a7e4c
+++ b/genhash/ssl.c
6a7e4c
@@ -44,7 +44,7 @@ void
6a7e4c
 init_ssl(void)
6a7e4c
 {
6a7e4c
 	/* Library initialization */
6a7e4c
-#if HAVE_OPENSSL_INIT_CRYPTO
6a7e4c
+#ifdef HAVE_OPENSSL_INIT_CRYPTO
6a7e4c
 #ifndef HAVE_OPENSSL_INIT_NO_LOAD_CONFIG_BUG
6a7e4c
 	/* In OpenSSL v1.1.1 if the following is called, SSL_CTX_new() below fails.
6a7e4c
 	 * It works in v1.1.0h and v1.1.1b.
6a7e4c
@@ -59,7 +59,7 @@ init_ssl(void)
6a7e4c
 #endif
6a7e4c
 
6a7e4c
 	/* Initialize SSL context */
6a7e4c
-#if HAVE_TLS_METHOD
6a7e4c
+#ifdef HAVE_TLS_METHOD
6a7e4c
 	req->meth = TLS_method();
6a7e4c
 #else
6a7e4c
 	req->meth = SSLv23_method();
6a7e4c
@@ -123,7 +123,7 @@ ssl_connect(thread_t * thread)
6a7e4c
 	}
6a7e4c
 
6a7e4c
 	BIO_set_nbio(sock_obj->bio, 1);	/* Set the Non-Blocking flag */
6a7e4c
-#if HAVE_SSL_SET0_RBIO
6a7e4c
+#ifdef HAVE_SSL_SET0_RBIO
6a7e4c
 	BIO_up_ref(sock_obj->bio);
6a7e4c
 	SSL_set0_rbio(sock_obj->ssl, sock_obj->bio);
6a7e4c
 	SSL_set0_wbio(sock_obj->ssl, sock_obj->bio);
6a7e4c
diff --git a/keepalived/check/check_ssl.c b/keepalived/check/check_ssl.c
6a7e4c
index 2743ea87..58061b91 100644
6a7e4c
--- a/keepalived/check/check_ssl.c
6a7e4c
+++ b/keepalived/check/check_ssl.c
6a7e4c
@@ -68,7 +68,7 @@ build_ssl_ctx(void)
6a7e4c
 	ssl_data_t *ssl;
6a7e4c
 
6a7e4c
 	/* Library initialization */
6a7e4c
-#if HAVE_OPENSSL_INIT_CRYPTO
6a7e4c
+#ifdef HAVE_OPENSSL_INIT_CRYPTO
6a7e4c
 #ifndef HAVE_OPENSSL_INIT_NO_LOAD_CONFIG_BUG
6a7e4c
 	/* In OpenSSL v1.1.1 if the following is called, SSL_CTX_new() below fails.
6a7e4c
 	 * It works in v1.1.0h and v1.1.1b.
6a7e4c
@@ -88,7 +88,7 @@ build_ssl_ctx(void)
6a7e4c
 		ssl = check_data->ssl;
6a7e4c
 
6a7e4c
 	/* Initialize SSL context */
6a7e4c
-#if HAVE_TLS_METHOD
6a7e4c
+#ifdef HAVE_TLS_METHOD
6a7e4c
 	ssl->meth = TLS_method();
6a7e4c
 #else
6a7e4c
 	ssl->meth = SSLv23_method();
6a7e4c
@@ -226,7 +226,7 @@ ssl_connect(thread_t * thread, int new_req)
6a7e4c
 
6a7e4c
 		BIO_get_fd(req->bio, &bio_fd);
6a7e4c
 		fcntl(bio_fd, F_SETFD, fcntl(bio_fd, F_GETFD) | FD_CLOEXEC);
6a7e4c
-#if HAVE_SSL_SET0_RBIO
6a7e4c
+#ifdef HAVE_SSL_SET0_RBIO
6a7e4c
 		BIO_up_ref(req->bio);
6a7e4c
 		SSL_set0_rbio(req->ssl, req->bio);
6a7e4c
 		SSL_set0_wbio(req->ssl, req->bio);
6a7e4c
-- 
6a7e4c
2.20.1
6a7e4c