aboutsummaryrefslogtreecommitdiff
path: root/security/softhsm2
diff options
context:
space:
mode:
authorNiclas Zeising <zeising@FreeBSD.org>2019-07-02 20:45:36 +0000
committerNiclas Zeising <zeising@FreeBSD.org>2019-07-02 20:45:36 +0000
commitfe39dad80734cda8b02366ffb1932b54d835d36d (patch)
tree0908373c26de50e25d7243ba154e5c435736d8bf /security/softhsm2
parent2bc14230cfe7afa96c439432346248fc0162d153 (diff)
downloadports-fe39dad80734cda8b02366ffb1932b54d835d36d.tar.gz
ports-fe39dad80734cda8b02366ffb1932b54d835d36d.zip
security/softhsm2: Fix build with non-base openSSL
PR: 233777 Submitted by: Sergey Akhmatov Approved by: Jaap Akkerhuis (maintainer)
Notes
Notes: svn path=/head/; revision=505706
Diffstat (limited to 'security/softhsm2')
-rw-r--r--security/softhsm2/Makefile4
-rw-r--r--security/softhsm2/files/patch-src_lib_crypto_OSSLCryptoFactory.cpp13
2 files changed, 15 insertions, 2 deletions
diff --git a/security/softhsm2/Makefile b/security/softhsm2/Makefile
index 6a1fec7e67d7..04c83bd25f86 100644
--- a/security/softhsm2/Makefile
+++ b/security/softhsm2/Makefile
@@ -3,7 +3,7 @@
PORTNAME= softhsm
PORTVERSION= 2.5.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= security
MASTER_SITES= http://dist.opendnssec.org/source/ \
http://dist.opendnssec.org/source/testing/
@@ -48,7 +48,7 @@ MIGRATE_CONFIGURE_WITH= migrate
CRYP_BOTAN_CONFIGURE_ON= --with-crypto-backend=botan
CRYP_BOTAN_LIB_DEPENDS= libbotan-1.10.so:security/botan110
-CRYP_OPEN_CONFIGURE_ON= --with-crypto-backend=openssl
+CRYP_OPEN_CONFIGURE_ON= --with-crypto-backend=openssl --with-openssl=${OPENSSLBASE}
.include <bsd.port.options.mk>
diff --git a/security/softhsm2/files/patch-src_lib_crypto_OSSLCryptoFactory.cpp b/security/softhsm2/files/patch-src_lib_crypto_OSSLCryptoFactory.cpp
new file mode 100644
index 000000000000..02bd177a2a6e
--- /dev/null
+++ b/security/softhsm2/files/patch-src_lib_crypto_OSSLCryptoFactory.cpp
@@ -0,0 +1,13 @@
+--- src/lib/crypto/OSSLCryptoFactory.cpp.orig 2019-07-02 17:52:44 UTC
++++ 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