summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Bar-Lev <alonbl@gentoo.org>2018-10-19 23:29:03 +0300
committerAlon Bar-Lev <alonbl@gentoo.org>2018-10-19 23:29:47 +0300
commitfde471e298782241675d66f2e7a4e3c11cf4e599 (patch)
tree494fb736b56c41bf6723920cbc5a3398bfd8c8ce /dev-libs/softhsm
parentdev-db/mysql: amd64 stable wrt bug #658822 (diff)
downloadgentoo-fde471e298782241675d66f2e7a4e3c11cf4e599.tar.gz
gentoo-fde471e298782241675d66f2e7a4e3c11cf4e599.tar.bz2
gentoo-fde471e298782241675d66f2e7a4e3c11cf4e599.zip
dev-libs/softhsm: fix libressl
Closes: https://bugs.gentoo.org/show_bug.cgi?id=669038 Signed-off-by: Alon Bar-Lev <alonbl@gentoo.org> Package-Manager: Portage-2.3.49, Repoman-2.3.11
Diffstat (limited to 'dev-libs/softhsm')
-rw-r--r--dev-libs/softhsm/files/softhsm-2.5.0-libressl.patch32
-rw-r--r--dev-libs/softhsm/softhsm-2.5.0.ebuild4
2 files changed, 36 insertions, 0 deletions
diff --git a/dev-libs/softhsm/files/softhsm-2.5.0-libressl.patch b/dev-libs/softhsm/files/softhsm-2.5.0-libressl.patch
new file mode 100644
index 000000000000..9aeaf2939ac4
--- /dev/null
+++ b/dev-libs/softhsm/files/softhsm-2.5.0-libressl.patch
@@ -0,0 +1,32 @@
+From 308b0b2760d6cb218003768747346d31764f1cfe Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Fri, 19 Oct 2018 23:19:48 +0300
+Subject: [PATCH] crypto: use ENGINE_load_rdrand with recent openssl
+
+libressl and probably older openssl do not support this.
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ src/lib/crypto/OSSLCryptoFactory.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+https://github.com/opendnssec/SoftHSMv2/pull/423
+
+diff --git a/src/lib/crypto/OSSLCryptoFactory.cpp b/src/lib/crypto/OSSLCryptoFactory.cpp
+index dc5f737..04d383d 100644
+--- a/src/lib/crypto/OSSLCryptoFactory.cpp
++++ b/src/lib/crypto/OSSLCryptoFactory.cpp
+@@ -141,8 +141,10 @@ OSSLCryptoFactory::OSSLCryptoFactory()
+ // Initialise OpenSSL
+ OpenSSL_add_all_algorithms();
+
++#if !( OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) )
+ // Make sure RDRAND is loaded first
+ ENGINE_load_rdrand();
++#endif
+ // Locate the engine
+ rdrand_engine = ENGINE_by_id("rdrand");
+ // Use RDRAND if available
+--
+2.18.1
+
diff --git a/dev-libs/softhsm/softhsm-2.5.0.ebuild b/dev-libs/softhsm/softhsm-2.5.0.ebuild
index aecd75f474e9..efb92f3af4d2 100644
--- a/dev-libs/softhsm/softhsm-2.5.0.ebuild
+++ b/dev-libs/softhsm/softhsm-2.5.0.ebuild
@@ -26,6 +26,10 @@ DOCS=(
README.md
)
+PATCHES=(
+ "${FILESDIR}/${P}-libressl.patch"
+)
+
src_configure() {
econf \
--disable-static \