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

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