public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/softhsm/files/, dev-libs/softhsm/
@ 2017-01-27 13:18 Alon Bar-Lev
  0 siblings, 0 replies; 3+ messages in thread
From: Alon Bar-Lev @ 2017-01-27 13:18 UTC (permalink / raw
  To: gentoo-commits

commit:     53682956e536011485062b36d5baf21da9a70391
Author:     Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 27 13:04:36 2017 +0000
Commit:     Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
CommitDate: Fri Jan 27 13:18:38 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=53682956

dev-libs/softhsm: fixups

take ownership (crypto)
move to openssl backend instead of botan
fix dependencies.
bump eapi.
more...

Bug: 604742
Bug: 604746
Bug: 605212
Bug: 604748

Package-Manager: portage-2.3.3

 dev-libs/softhsm/files/softhsm-2.2.0-build.patch | 251 +++++++++++++++++++++++
 dev-libs/softhsm/metadata.xml                    |   5 +-
 dev-libs/softhsm/softhsm-2.2.0-r1.ebuild         |  51 +++++
 3 files changed, 305 insertions(+), 2 deletions(-)

diff --git a/dev-libs/softhsm/files/softhsm-2.2.0-build.patch b/dev-libs/softhsm/files/softhsm-2.2.0-build.patch
new file mode 100644
index 00000000..83b6548
--- /dev/null
+++ b/dev-libs/softhsm/files/softhsm-2.2.0-build.patch
@@ -0,0 +1,251 @@
+From ae2fea013237e227ab62b52f9855a8f9dd8dcdbb Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Fri, 27 Jan 2017 14:18:19 +0200
+Subject: [PATCH 1/2] build: add missing log dependency to test
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ src/lib/test/Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/lib/test/Makefile.am b/src/lib/test/Makefile.am
+index 339593e..4555ff2 100644
+--- a/src/lib/test/Makefile.am
++++ b/src/lib/test/Makefile.am
+@@ -25,6 +25,7 @@ p11test_SOURCES =		p11test.cpp \
+ 				AsymWrapUnwrapTests.cpp \
+ 				TestsBase.cpp \
+ 				TestsNoPINInitBase.cpp \
++				../common/log.cpp \
+ 				../common/osmutex.cpp
+ 
+ p11test_LDADD =			../libsofthsm2.la 
+-- 
+2.10.2
+
+From c90ba51dd944c9e842e4743cf8dd9d5f4ea7bc5d Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Fri, 27 Jan 2017 14:41:11 +0200
+Subject: [PATCH 2/2] build: tests: use pkg-config for cppunit
+
+do not execute cppunit-config over and over.
+move detection to autoconf.
+use standard pkg-config module of pkg-config instead
+of cppunit-config.
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ configure.ac                          | 3 +++
+ m4/acx_cppunit.m4                     | 4 ++++
+ src/lib/crypto/test/Makefile.am       | 7 ++++---
+ src/lib/data_mgr/test/Makefile.am     | 7 ++++---
+ src/lib/handle_mgr/test/Makefile.am   | 7 ++++---
+ src/lib/object_store/test/Makefile.am | 7 ++++---
+ src/lib/session_mgr/test/Makefile.am  | 7 ++++---
+ src/lib/slot_mgr/test/Makefile.am     | 7 ++++---
+ src/lib/test/Makefile.am              | 7 ++++---
+ 9 files changed, 35 insertions(+), 21 deletions(-)
+ create mode 100644 m4/acx_cppunit.m4
+
+diff --git a/configure.ac b/configure.ac
+index 4ecabd6..7df0f73 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -117,6 +117,9 @@ ACX_VISIBILITY
+ # If we should install the p11-kit module
+ ACX_P11KIT
+ 
++# cppunit setetings
++ACX_CPPUNIT
++
+ # Set full directory paths
+ full_sysconfdir=`eval eval eval eval eval echo "${sysconfdir}" | sed "s#NONE#${prefix}#" | sed "s#NONE#${ac_default_prefix}#"`
+ full_localstatedir=`eval eval eval eval eval echo "${localstatedir}" | sed "s#NONE#${prefix}#" | sed "s#NONE#${ac_default_prefix}#"`
+diff --git a/m4/acx_cppunit.m4 b/m4/acx_cppunit.m4
+new file mode 100644
+index 0000000..ff5b90e
+--- /dev/null
++++ b/m4/acx_cppunit.m4
+@@ -0,0 +1,4 @@
++AC_DEFUN([ACX_CPPUNIT],[
++	PKG_PROG_PKG_CONFIG
++	PKG_CHECK_MODULES([CPPUNIT], [cppunit], [have_cppunit=yes], [have_cppunit=no])
++])
+diff --git a/src/lib/crypto/test/Makefile.am b/src/lib/crypto/test/Makefile.am
+index ca7e421..81c2ce6 100644
+--- a/src/lib/crypto/test/Makefile.am
++++ b/src/lib/crypto/test/Makefile.am
+@@ -8,8 +8,9 @@ AM_CPPFLAGS = 			-I$(srcdir)/.. \
+ 				-I$(srcdir)/../../object_store \
+ 				-I$(srcdir)/../../session_mgr \
+ 				-I$(srcdir)/../../slot_mgr \
+-				@CRYPTO_INCLUDES@ \
+-				`cppunit-config --cflags`
++				@CRYPTO_INCLUDES@
++
++AM_CFLAGS =			@CPPUNIT_CFLAGS@
+ 
+ check_PROGRAMS =		cryptotest
+ 
+@@ -32,7 +33,7 @@ cryptotest_SOURCES =		cryptotest.cpp \
+ 
+ cryptotest_LDADD =		../../libsofthsm_convarch.la
+ 
+-cryptotest_LDFLAGS = 		@CRYPTO_LIBS@ -no-install `cppunit-config --libs`
++cryptotest_LDFLAGS = 		@CRYPTO_LIBS@ @CPPUNIT_LIBS@ -no-install
+ 
+ TESTS = 			cryptotest
+ 
+diff --git a/src/lib/data_mgr/test/Makefile.am b/src/lib/data_mgr/test/Makefile.am
+index 27b4fbd..944224c 100644
+--- a/src/lib/data_mgr/test/Makefile.am
++++ b/src/lib/data_mgr/test/Makefile.am
+@@ -8,8 +8,9 @@ AM_CPPFLAGS = 			-I$(srcdir)/.. \
+ 				-I$(srcdir)/../../object_store \
+ 				-I$(srcdir)/../../session_mgr \
+ 				-I$(srcdir)/../../slot_mgr \
+-				@CRYPTO_INCLUDES@ \
+-				`cppunit-config --cflags`
++				@CRYPTO_INCLUDES@
++
++AM_CFLAGS =			@CPPUNIT_CFLAGS@
+ 
+ check_PROGRAMS =		datamgrtest
+ 
+@@ -20,7 +21,7 @@ datamgrtest_SOURCES =		datamgrtest.cpp \
+ 
+ datamgrtest_LDADD =		../../libsofthsm_convarch.la 
+ 
+-datamgrtest_LDFLAGS = 		@CRYPTO_LIBS@ -no-install `cppunit-config --libs`
++datamgrtest_LDFLAGS = 		@CRYPTO_LIBS@ @CPPUNIT_LIBS@ -no-install
+ 
+ TESTS = 			datamgrtest
+ 
+diff --git a/src/lib/handle_mgr/test/Makefile.am b/src/lib/handle_mgr/test/Makefile.am
+index 4cf92e4..f439a56 100644
+--- a/src/lib/handle_mgr/test/Makefile.am
++++ b/src/lib/handle_mgr/test/Makefile.am
+@@ -8,8 +8,9 @@ AM_CPPFLAGS = 			-I$(srcdir)/.. \
+ 				-I$(srcdir)/../../object_store \
+ 				-I$(srcdir)/../../session_mgr \
+ 				-I$(srcdir)/../../slot_mgr \
+-				-I$(srcdir)/../../data_mgr \
+-				`cppunit-config --cflags`
++				-I$(srcdir)/../../data_mgr
++
++AM_CFLAGS =			@CPPUNIT_CFLAGS@
+ 
+ check_PROGRAMS =		handlemgrtest
+ 
+@@ -18,7 +19,7 @@ handlemgrtest_SOURCES =		handlemgrtest.cpp \
+ 
+ handlemgrtest_LDADD =		../../libsofthsm_convarch.la 
+ 
+-handlemgrtest_LDFLAGS = 	@CRYPTO_LIBS@ -no-install `cppunit-config --libs`
++handlemgrtest_LDFLAGS = 	@CRYPTO_LIBS@ @CPPUNIT_LIBS@ -no-install
+ 
+ TESTS = 			handlemgrtest
+ 
+diff --git a/src/lib/object_store/test/Makefile.am b/src/lib/object_store/test/Makefile.am
+index ab2aa82..eec4a92 100644
+--- a/src/lib/object_store/test/Makefile.am
++++ b/src/lib/object_store/test/Makefile.am
+@@ -8,8 +8,9 @@ AM_CPPFLAGS = 			-I$(srcdir)/.. \
+ 				-I$(srcdir)/../../data_mgr \
+ 				-I$(srcdir)/../../session_mgr \
+ 				-I$(srcdir)/../../slot_mgr \
+-				@CRYPTO_INCLUDES@ \
+-				`cppunit-config --cflags`
++				@CRYPTO_INCLUDES@
++
++AM_CFLAGS =			@CPPUNIT_CFLAGS@
+ 
+ check_PROGRAMS =		objstoretest
+ 
+@@ -32,7 +33,7 @@ endif
+ 
+ objstoretest_LDADD =		../../libsofthsm_convarch.la 
+ 
+-objstoretest_LDFLAGS = 		@CRYPTO_LIBS@ -no-install `cppunit-config --libs` -pthread
++objstoretest_LDFLAGS = 		@CRYPTO_LIBS@ @CPPUNIT_LIBS@ -no-install -pthread
+ 
+ TESTS = 			objstoretest
+ 
+diff --git a/src/lib/session_mgr/test/Makefile.am b/src/lib/session_mgr/test/Makefile.am
+index 5e9a71c..385deec 100644
+--- a/src/lib/session_mgr/test/Makefile.am
++++ b/src/lib/session_mgr/test/Makefile.am
+@@ -8,8 +8,9 @@ AM_CPPFLAGS = 			-I$(srcdir)/.. \
+ 				-I$(srcdir)/../../data_mgr \
+ 				-I$(srcdir)/../../session_mgr \
+ 				-I$(srcdir)/../../slot_mgr \
+-				-I$(srcdir)/../../object_store \
+-				`cppunit-config --cflags`
++				-I$(srcdir)/../../object_store
++
++AM_CFLAGS =			@CPPUNIT_CFLAGS@
+ 
+ check_PROGRAMS =		sessionmgrtest
+ 
+@@ -18,7 +19,7 @@ sessionmgrtest_SOURCES =	sessionmgrtest.cpp \
+ 
+ sessionmgrtest_LDADD =		../../libsofthsm_convarch.la 
+ 
+-sessionmgrtest_LDFLAGS =	@CRYPTO_LIBS@ -no-install `cppunit-config --libs` -pthread
++sessionmgrtest_LDFLAGS =	@CRYPTO_LIBS@ @CPPUNIT_LIBS@ -no-install -pthread
+ 
+ TESTS = 			sessionmgrtest
+ 
+diff --git a/src/lib/slot_mgr/test/Makefile.am b/src/lib/slot_mgr/test/Makefile.am
+index e9b9ce2..ecf36f5 100644
+--- a/src/lib/slot_mgr/test/Makefile.am
++++ b/src/lib/slot_mgr/test/Makefile.am
+@@ -8,8 +8,9 @@ AM_CPPFLAGS = 			-I$(srcdir)/.. \
+ 				-I$(srcdir)/../../object_store \
+ 				-I$(srcdir)/../../session_mgr \
+ 				-I$(srcdir)/../../data_mgr \
+-				@CRYPTO_INCLUDES@ \
+-				`cppunit-config --cflags`
++				@CRYPTO_INCLUDES@
++
++AM_CFLAGS =			@CPPUNIT_CFLAGS@
+ 
+ check_PROGRAMS =		slotmgrtest
+ 
+@@ -18,7 +19,7 @@ slotmgrtest_SOURCES =		slotmgrtest.cpp \
+ 
+ slotmgrtest_LDADD =		../../libsofthsm_convarch.la 
+ 
+-slotmgrtest_LDFLAGS = 		@CRYPTO_LIBS@ -no-install `cppunit-config --libs` -pthread
++slotmgrtest_LDFLAGS = 		@CRYPTO_LIBS@ @CPPUNIT_LIBS@ -no-install -pthread
+ 
+ TESTS = 			slotmgrtest
+ 
+diff --git a/src/lib/test/Makefile.am b/src/lib/test/Makefile.am
+index 4555ff2..9d157a5 100644
+--- a/src/lib/test/Makefile.am
++++ b/src/lib/test/Makefile.am
+@@ -2,8 +2,9 @@ MAINTAINERCLEANFILES = 		$(srcdir)/Makefile.in
+ 
+ AM_CPPFLAGS = 			-I$(srcdir)/.. \
+ 				-I$(srcdir)/../cryptoki_compat \
+-				-I$(srcdir)/../common \
+-				`cppunit-config --cflags`
++				-I$(srcdir)/../common
++
++AM_CFLAGS =			@CPPUNIT_CFLAGS@
+ 
+ check_PROGRAMS =		p11test
+ 
+@@ -30,7 +31,7 @@ p11test_SOURCES =		p11test.cpp \
+ 
+ p11test_LDADD =			../libsofthsm2.la 
+ 
+-p11test_LDFLAGS = 		@CRYPTO_LIBS@ -no-install `cppunit-config --libs` -pthread -static
++p11test_LDFLAGS = 		@CRYPTO_LIBS@ @CPPUNIT_LIBS@ -no-install -pthread -static
+ 
+ TESTS = 			p11test
+ 
+-- 
+2.10.2
+

diff --git a/dev-libs/softhsm/metadata.xml b/dev-libs/softhsm/metadata.xml
index 9afd1b5..1db90fe 100644
--- a/dev-libs/softhsm/metadata.xml
+++ b/dev-libs/softhsm/metadata.xml
@@ -1,8 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-	<maintainer type="person">
-		<email>mschiff@gentoo.org</email>
+	<maintainer type="project">
+		<email>crypto@gentoo.org</email>
+		<name>Crypto</name>
 	</maintainer>
 	<use>
 		<flag name="migration-tool">

diff --git a/dev-libs/softhsm/softhsm-2.2.0-r1.ebuild b/dev-libs/softhsm/softhsm-2.2.0-r1.ebuild
new file mode 100644
index 00000000..0b92129
--- /dev/null
+++ b/dev-libs/softhsm/softhsm-2.2.0-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit autotools eutils
+
+DESCRIPTION="A software PKCS#11 implementation"
+HOMEPAGE="http://www.opendnssec.org/"
+SRC_URI="http://www.opendnssec.org/files/source/${P}.tar.gz"
+
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE="libressl +migration-tool test"
+SLOT="2"
+LICENSE="BSD"
+
+RDEPEND="
+	sys-devel/gcc:=[cxx]
+	dev-db/sqlite:3
+	!libressl? ( dev-libs/openssl:= )
+	libressl? ( dev-libs/libressl )
+	!=dev-libs/softhsm-2.0.0:0
+"
+DEPEND="${RDEPEND}
+	virtual/pkgconfig
+	test? ( dev-util/cppunit )
+"
+
+PATCHES=(
+	"${FILESDIR}/${P}-build.patch"
+)
+DOCS=( NEWS README.md )
+
+src_prepare() {
+	default
+	eautoreconf
+}
+
+src_configure() {
+	econf \
+		--disable-static \
+		--with-crypto-backend=openssl \
+		--disable-p11-kit \
+		$(use_with migration-tool migrate)
+}
+
+src_install() {
+	default
+	prune_libtool_files --modules
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/softhsm/files/, dev-libs/softhsm/
@ 2017-01-28 19:46 Alon Bar-Lev
  0 siblings, 0 replies; 3+ messages in thread
From: Alon Bar-Lev @ 2017-01-28 19:46 UTC (permalink / raw
  To: gentoo-commits

commit:     2e4b8b8b4af526bb6821edcc68e6dd5077364a0f
Author:     Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 28 19:45:48 2017 +0000
Commit:     Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
CommitDate: Sat Jan 28 19:46:11 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e4b8b8b

dev-libs/softhsm: support libressl

Package-Manager: portage-2.3.3

 .../softhsm/files/softhsm-2.2.0-libressl.patch     | 203 +++++++++++++++++++++
 dev-libs/softhsm/softhsm-2.2.0-r2.ebuild           |   1 +
 2 files changed, 204 insertions(+)

diff --git a/dev-libs/softhsm/files/softhsm-2.2.0-libressl.patch b/dev-libs/softhsm/files/softhsm-2.2.0-libressl.patch
new file mode 100644
index 00000000..c8b6237
--- /dev/null
+++ b/dev-libs/softhsm/files/softhsm-2.2.0-libressl.patch
@@ -0,0 +1,203 @@
+From 13ed52e65f6f07f2c0c2aa70604298c9f983693d Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Sat, 28 Jan 2017 21:09:05 +0200
+Subject: [PATCH] crypto: openssl: libressl support
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ m4/acx_openssl_gost.m4               | 2 +-
+ src/lib/crypto/OSSLComp.cpp          | 2 +-
+ src/lib/crypto/OSSLComp.h            | 2 +-
+ src/lib/crypto/OSSLCryptoFactory.cpp | 2 +-
+ src/lib/crypto/OSSLDHPrivateKey.cpp  | 2 +-
+ src/lib/crypto/OSSLDHPublicKey.cpp   | 2 +-
+ src/lib/crypto/OSSLDSAPrivateKey.cpp | 2 +-
+ src/lib/crypto/OSSLDSAPublicKey.cpp  | 2 +-
+ src/lib/crypto/OSSLECDH.cpp          | 2 +-
+ src/lib/crypto/OSSLECDSA.cpp         | 4 ++--
+ src/lib/crypto/OSSLRSAPrivateKey.cpp | 2 +-
+ src/lib/crypto/OSSLRSAPublicKey.cpp  | 2 +-
+ win32/Configure.py                   | 2 +-
+ 13 files changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/m4/acx_openssl_gost.m4 b/m4/acx_openssl_gost.m4
+index 2a949f2..dca489b 100644
+--- a/m4/acx_openssl_gost.m4
++++ b/m4/acx_openssl_gost.m4
+@@ -22,7 +22,7 @@ AC_DEFUN([ACX_OPENSSL_GOST],[
+ 				OpenSSL_add_all_algorithms();
+ 
+ 				/* Load engines */
+-			#if OPENSSL_VERSION_NUMBER < 0x10100000L
++			#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ 				ENGINE_load_builtin_engines();
+ 			#else
+ 				OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_ALL_BUILTIN | OPENSSL_INIT_LOAD_CONFIG, NULL);
+diff --git a/src/lib/crypto/OSSLComp.cpp b/src/lib/crypto/OSSLComp.cpp
+index 31333f6..ede710b 100644
+--- a/src/lib/crypto/OSSLComp.cpp
++++ b/src/lib/crypto/OSSLComp.cpp
+@@ -34,7 +34,7 @@
+ #include "OSSLComp.h"
+ #include <openssl/opensslv.h>
+ 
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ 
+ /*
+  * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
+diff --git a/src/lib/crypto/OSSLComp.h b/src/lib/crypto/OSSLComp.h
+index 71d6c21..4bced32 100644
+--- a/src/lib/crypto/OSSLComp.h
++++ b/src/lib/crypto/OSSLComp.h
+@@ -36,7 +36,7 @@
+ #include "config.h"
+ #include <openssl/opensslv.h>
+ 
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ 
+ #include <openssl/evp.h>
+ #include <openssl/hmac.h>
+diff --git a/src/lib/crypto/OSSLCryptoFactory.cpp b/src/lib/crypto/OSSLCryptoFactory.cpp
+index cd7f9d3..41134df 100644
+--- a/src/lib/crypto/OSSLCryptoFactory.cpp
++++ b/src/lib/crypto/OSSLCryptoFactory.cpp
+@@ -134,7 +134,7 @@ OSSLCryptoFactory::OSSLCryptoFactory()
+ 
+ #ifdef WITH_GOST
+ 	// Load engines
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ 	ENGINE_load_builtin_engines();
+ #else
+ 	OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_ALL_BUILTIN |
+diff --git a/src/lib/crypto/OSSLDHPrivateKey.cpp b/src/lib/crypto/OSSLDHPrivateKey.cpp
+index 4c1b9c3..5571a88 100644
+--- a/src/lib/crypto/OSSLDHPrivateKey.cpp
++++ b/src/lib/crypto/OSSLDHPrivateKey.cpp
+@@ -210,7 +210,7 @@ void OSSLDHPrivateKey::createOSSLKey()
+ 	}
+ 
+ 	// Use the OpenSSL implementation and not any engine
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ 
+ #ifdef WITH_FIPS
+ 	if (FIPS_mode())
+diff --git a/src/lib/crypto/OSSLDHPublicKey.cpp b/src/lib/crypto/OSSLDHPublicKey.cpp
+index 78820e1..e261726 100644
+--- a/src/lib/crypto/OSSLDHPublicKey.cpp
++++ b/src/lib/crypto/OSSLDHPublicKey.cpp
+@@ -151,7 +151,7 @@ void OSSLDHPublicKey::createOSSLKey()
+ 	}
+ 
+ 	// Use the OpenSSL implementation and not any engine
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ 
+ #ifdef WITH_FIPS
+ 	if (FIPS_mode())
+diff --git a/src/lib/crypto/OSSLDSAPrivateKey.cpp b/src/lib/crypto/OSSLDSAPrivateKey.cpp
+index 2192fad..527e041 100644
+--- a/src/lib/crypto/OSSLDSAPrivateKey.cpp
++++ b/src/lib/crypto/OSSLDSAPrivateKey.cpp
+@@ -227,7 +227,7 @@ void OSSLDSAPrivateKey::createOSSLKey()
+ 	}
+ 
+ 	// Use the OpenSSL implementation and not any engine
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ 
+ #ifdef WITH_FIPS
+ 	if (FIPS_mode())
+diff --git a/src/lib/crypto/OSSLDSAPublicKey.cpp b/src/lib/crypto/OSSLDSAPublicKey.cpp
+index 71ec3bf..38ecc79 100644
+--- a/src/lib/crypto/OSSLDSAPublicKey.cpp
++++ b/src/lib/crypto/OSSLDSAPublicKey.cpp
+@@ -168,7 +168,7 @@ void OSSLDSAPublicKey::createOSSLKey()
+ 	}
+ 
+ 	// Use the OpenSSL implementation and not any engine
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ 
+ #ifdef WITH_FIPS
+ 	if (FIPS_mode())
+diff --git a/src/lib/crypto/OSSLECDH.cpp b/src/lib/crypto/OSSLECDH.cpp
+index 9afbf38..e2abaeb 100644
+--- a/src/lib/crypto/OSSLECDH.cpp
++++ b/src/lib/crypto/OSSLECDH.cpp
+@@ -187,7 +187,7 @@ bool OSSLECDH::deriveKey(SymmetricKey **ppSymmetricKey, PublicKey* publicKey, Pr
+ 	}
+ 
+ 	// Use the OpenSSL implementation and not any engine
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ 
+ #ifdef WITH_FIPS
+ 	if (FIPS_mode())
+diff --git a/src/lib/crypto/OSSLECDSA.cpp b/src/lib/crypto/OSSLECDSA.cpp
+index 80d2386..7387367 100644
+--- a/src/lib/crypto/OSSLECDSA.cpp
++++ b/src/lib/crypto/OSSLECDSA.cpp
+@@ -78,7 +78,7 @@ bool OSSLECDSA::sign(PrivateKey* privateKey, const ByteString& dataToSign,
+ 	}
+ 
+ 	// Use the OpenSSL implementation and not any engine
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ 
+ #ifdef WITH_FIPS
+ 	if (FIPS_mode())
+@@ -170,7 +170,7 @@ bool OSSLECDSA::verify(PublicKey* publicKey, const ByteString& originalData,
+ 	}
+ 
+ 	// Use the OpenSSL implementation and not any engine
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ 
+ #ifdef WITH_FIPS
+ 	if (FIPS_mode())
+diff --git a/src/lib/crypto/OSSLRSAPrivateKey.cpp b/src/lib/crypto/OSSLRSAPrivateKey.cpp
+index 94ec432..26065cf 100644
+--- a/src/lib/crypto/OSSLRSAPrivateKey.cpp
++++ b/src/lib/crypto/OSSLRSAPrivateKey.cpp
+@@ -289,7 +289,7 @@ void OSSLRSAPrivateKey::createOSSLKey()
+ 	}
+ 
+ 	// Use the OpenSSL implementation and not any engine
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ 
+ #ifdef WITH_FIPS
+ 	if (FIPS_mode())
+diff --git a/src/lib/crypto/OSSLRSAPublicKey.cpp b/src/lib/crypto/OSSLRSAPublicKey.cpp
+index 71b1b92..2a6893b 100644
+--- a/src/lib/crypto/OSSLRSAPublicKey.cpp
++++ b/src/lib/crypto/OSSLRSAPublicKey.cpp
+@@ -133,7 +133,7 @@ void OSSLRSAPublicKey::createOSSLKey()
+ 	}
+ 
+ 	// Use the OpenSSL implementation and not any engine
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ 
+ #ifdef WITH_FIPS
+ 	if (FIPS_mode())
+diff --git a/win32/Configure.py b/win32/Configure.py
+index 0a01e0c..2ad652d 100644
+--- a/win32/Configure.py
++++ b/win32/Configure.py
+@@ -789,7 +789,7 @@ int main() {\n\
+  ENGINE *eg;\n\
+  const EVP_MD* EVP_GOST_34_11;\n\
+  OpenSSL_add_all_algorithms();\n\
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L\n\
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)\n\
+  ENGINE_load_builtin_engines();\n\
+ #else\n\
+  OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_ALL_BUILTIN | OPENSSL_INIT_LOAD_CONFIG, NULL);\n\
+-- 
+2.10.2
+

diff --git a/dev-libs/softhsm/softhsm-2.2.0-r2.ebuild b/dev-libs/softhsm/softhsm-2.2.0-r2.ebuild
index 69ffb23..6dad3b0 100644
--- a/dev-libs/softhsm/softhsm-2.2.0-r2.ebuild
+++ b/dev-libs/softhsm/softhsm-2.2.0-r2.ebuild
@@ -29,6 +29,7 @@ DEPEND="${RDEPEND}
 
 PATCHES=(
 	"${FILESDIR}/${P}-build.patch"
+	"${FILESDIR}/${P}-libressl.patch"
 )
 DOCS=( NEWS README.md )
 


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/softhsm/files/, dev-libs/softhsm/
@ 2018-10-19 20:29 Alon Bar-Lev
  0 siblings, 0 replies; 3+ messages in thread
From: Alon Bar-Lev @ 2018-10-19 20:29 UTC (permalink / raw
  To: gentoo-commits

commit:     fde471e298782241675d66f2e7a4e3c11cf4e599
Author:     Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 19 20:29:03 2018 +0000
Commit:     Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
CommitDate: Fri Oct 19 20:29:47 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fde471e2

dev-libs/softhsm: fix libressl

Closes: https://bugs.gentoo.org/show_bug.cgi?id=669038
Signed-off-by: Alon Bar-Lev <alonbl <AT> gentoo.org>
Package-Manager: Portage-2.3.49, Repoman-2.3.11

 .../softhsm/files/softhsm-2.5.0-libressl.patch     | 32 ++++++++++++++++++++++
 dev-libs/softhsm/softhsm-2.5.0.ebuild              |  4 +++
 2 files changed, 36 insertions(+)

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 00000000000..9aeaf2939ac
--- /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 aecd75f474e..efb92f3af4d 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 \


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-10-19 20:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-27 13:18 [gentoo-commits] repo/gentoo:master commit in: dev-libs/softhsm/files/, dev-libs/softhsm/ Alon Bar-Lev
  -- strict thread matches above, loose matches on Subject: below --
2017-01-28 19:46 Alon Bar-Lev
2018-10-19 20:29 Alon Bar-Lev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox