isns-utils/0006-fix-compilation-without-deprecated-OpenSSL-APIs.patch
2020-09-17 14:34:17 -07:00

42 lines
1002 B
Diff

From 18de2f0670ede5e15a45a94ddecd4218e9267831 Mon Sep 17 00:00:00 2001
From: Rosen Penev <rosenp@gmail.com>
Date: Wed, 22 Apr 2020 14:35:54 -0700
Subject: [PATCH 6/7] fix compilation without deprecated OpenSSL APIs
Needed two missing headers and a small ifdef fix.
---
pki.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pki.c b/pki.c
index 57ea664..00dc383 100644
--- a/pki.c
+++ b/pki.c
@@ -15,6 +15,8 @@
#include <openssl/pem.h>
#include <openssl/err.h>
#include <openssl/evp.h>
+#include <openssl/dsa.h>
+#include <openssl/bn.h>
#endif
#include <libisns/isns.h>
#include "security.h"
@@ -97,13 +99,11 @@ isns_create_dsa_context(void)
isns_security_t *ctx;
if (!isns_openssl_init) {
- ERR_load_crypto_strings();
#if OPENSSL_API_COMPAT < 0x10100000L
+ ERR_load_crypto_strings();
OpenSSL_add_all_algorithms();
OpenSSL_add_all_ciphers();
OpenSSL_add_all_digests();
-#else
- OPENSSL_init_crypto();
#endif
isns_openssl_init = 1;
}
--
2.18.1