summaryrefslogtreecommitdiff
path: root/dev-libs/softhsm
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-10-22 11:09:47 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-10-22 11:09:47 +0100
commit64e107b9b6058580ff0432107eb37cefb0b2a7d8 (patch)
tree9a44e603e2ae365e2b1fe35ac37f73e830cdee1d /dev-libs/softhsm
parent957235cf19a691360c720f7913672adda4258ed0 (diff)
gentoo resync : 22.10.2018
Diffstat (limited to 'dev-libs/softhsm')
-rw-r--r--dev-libs/softhsm/Manifest3
-rw-r--r--dev-libs/softhsm/files/softhsm-2.5.0-libressl.patch32
-rw-r--r--dev-libs/softhsm/softhsm-2.5.0.ebuild49
3 files changed, 84 insertions, 0 deletions
diff --git a/dev-libs/softhsm/Manifest b/dev-libs/softhsm/Manifest
index b971cbcb3616..dec320c24bd5 100644
--- a/dev-libs/softhsm/Manifest
+++ b/dev-libs/softhsm/Manifest
@@ -1,3 +1,6 @@
+AUX softhsm-2.5.0-libressl.patch 1046 BLAKE2B e647878998493606d9941f1b4683be8f072f5c5779fb6aa6606857a12af7aa0228d349b722813449ed33a026ea5e8bec9b0e6235ac6c271f34c61fca7eafb4b4 SHA512 23c8048ef08417422194eb84d4581b4a1c443de6917608f953cdcb5b2433446272d937e05eabc6bae17d88061a0b3aa997355b7b47e71702dc52d69223972809
DIST softhsm-2.4.0.tar.gz 1042566 BLAKE2B 01a0f4bdc589847c4a1f860c3e3f572644d874b11d7ab8e149e598fc123b75e898de9a46f73f5f2a107edcaeabdda29e4b9b6d54af5b95ad79a3c7b7b77b8bbf SHA512 f14f65de32206500f708523ee88d8d5e3d1fd40175f1a9cd24c7760c829e2de9dbcb05453022df8186836c49a57e4eae7f2e75ce6a5346a426114f4d610a8a84
+DIST softhsm-2.5.0.tar.gz 1078439 BLAKE2B f96f9e08f3ea568daccb64a5de94ac91b5efcee3dea09f460e98491e7fcdca1277ed52c339a2ec10dac2f78c9e7e44fe5c4a7d36c58e97afba6e749979d4d7e0 SHA512 a1e686729196dc25591eb3da57c2c8ea8494ed274ba711842b2dcae696f477a202acda13a975b8fb1eb68e8e44a79e839dbbc6ba500cab02ad13072c660752d9
EBUILD softhsm-2.4.0.ebuild 1041 BLAKE2B c20642ae2741ce0941fa12b8ab4ba3162df9484c775a88c5e4a15b0e774471fc872b0c9d486a081afdda800d4e08b4798b05b44c32a387dd93b4ea1f433c2309 SHA512 721f120e09c2fc85154cecd824a85c36d499fcb11eb5173a52cb3c73c941fa7234d97492a1e675f04ceca192475cd31fde61313f0951eb0ba5618b434e483662
+EBUILD softhsm-2.5.0.ebuild 1089 BLAKE2B fc038b382c50a1f0b065dcf1145b5a74189119961f24432d78c89516cf3fb225a6de38118f63a5be9e2965b138810b395850e3f9d2a4c06cf06ad8bd4408a4df SHA512 d6f213a0edab60adc5c741f5a54d650ec4ee268c689e5b893ac1f4417f7f70cf90cf93d5b8dab105cfaa03dcea7ad4cb809b7e4693962233af1a79f83e00ebea
MISC metadata.xml 322 BLAKE2B 64433451cd97495272e25d2bd1a4ad951781f7a61e47f1f048b13b4a1b4f577f9eb37f1145f1d9710969cfd9e38dd89aacc83641ec8b3bf0b36027c39a8dfe8b SHA512 b145c1ee8c20a9aad9c9b8e6f6526c596dd80a993faecb8e8caf6e930cf05e32f3e6ef5ad72c337a43c48cf57224f209e65d177567e3c5c577d3872eb11841a8
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
new file mode 100644
index 000000000000..efb92f3af4d2
--- /dev/null
+++ b/dev-libs/softhsm/softhsm-2.5.0.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="A software PKCS#11 implementation"
+HOMEPAGE="https://www.opendnssec.org/"
+SRC_URI="https://www.opendnssec.org/files/source/${P}.tar.gz"
+
+KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="bindist libressl migration-tool test"
+SLOT="2"
+LICENSE="BSD"
+
+RDEPEND="migration-tool? ( dev-db/sqlite:3= )
+ !libressl? ( dev-libs/openssl:=[bindist=] )
+ libressl? ( dev-libs/libressl:= )
+ !~dev-libs/softhsm-2.0.0:0"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig
+ sys-devel/gcc:=[cxx]
+ test? ( dev-util/cppunit )"
+
+DOCS=(
+ NEWS
+ README.md
+)
+
+PATCHES=(
+ "${FILESDIR}/${P}-libressl.patch"
+)
+
+src_configure() {
+ econf \
+ --disable-static \
+ --with-crypto-backend=openssl \
+ --disable-p11-kit \
+ --localstatedir="${EROOT}/var" \
+ $(use_enable !bindist ecc) \
+ $(use_enable !libressl gost) \
+ $(use_with migration-tool migrate)
+}
+
+src_install() {
+ default
+ find "${D}" -name '*.la' -delete || die
+
+ keepdir "${EROOT}/var/lib/softhsm/tokens"
+}