From ccd569e06fc2ff1da5e6785f520c0623264d7254 Mon Sep 17 00:00:00 2001 From: Norbert Pocs Date: Thu, 6 Oct 2022 16:45:45 +0200 Subject: [PATCH] Enable pkcs11 support in 0.10.4 Signed-off-by: Norbert Pocs --- libssh.spec | 11 ++++- pkcs11_test_fix.patch | 98 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 pkcs11_test_fix.patch diff --git a/libssh.spec b/libssh.spec index 4bfd0c5..2b112da 100644 --- a/libssh.spec +++ b/libssh.spec @@ -1,6 +1,6 @@ Name: libssh Version: 0.10.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A library implementing the SSH protocol License: LGPLv2+ URL: http://www.libssh.org @@ -26,6 +26,9 @@ BuildRequires: uid_wrapper BuildRequires: openssh-clients BuildRequires: openssh-server BuildRequires: nmap-ncat +BuildRequires: openssl-pkcs11 +BuildRequires: softhsm +BuildRequires: gnutls-utils Requires: %{name}-config = %{version}-%{release} @@ -37,6 +40,8 @@ Provides: libssh_threads.so.4()(64bit) Provides: libssh_threads.so.4 %endif +Patch1: pkcs11_test_fix.patch + %description The ssh library was designed to be used by programmers needing a working SSH implementation by the mean of a library. The complete control of the client is @@ -70,6 +75,7 @@ gpgv2 --quiet --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0} -DUNIT_TESTING=ON \ -DCLIENT_TESTING=ON \ -DSERVER_TESTING=ON \ + -DWITH_PKCS11_URI=ON \ -DGLOBAL_CLIENT_CONFIG="%{_sysconfdir}/libssh/libssh_client.config" \ -DGLOBAL_BIND_CONFIG="%{_sysconfdir}/libssh/libssh_server.config" @@ -127,6 +133,9 @@ popd %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/libssh/libssh_server.config %changelog +* Thu Oct 06 2022 Norbert Pocs - 0.10.4-2 +- Enable pkcs11 support + * Wed Sep 07 2022 Andreas Schneider - 0.10.4-1 - Update to version 0.10.4 https://git.libssh.org/projects/libssh.git/tag/?h=libssh-0.10.4 diff --git a/pkcs11_test_fix.patch b/pkcs11_test_fix.patch new file mode 100644 index 0000000..83ff4d2 --- /dev/null +++ b/pkcs11_test_fix.patch @@ -0,0 +1,98 @@ +diff --git a/tests/pkcs11/setup-softhsm-tokens.sh b/tests/pkcs11/setup-softhsm-tokens.sh +index 532c86a7..9050cea6 100755 +--- a/tests/pkcs11/setup-softhsm-tokens.sh ++++ b/tests/pkcs11/setup-softhsm-tokens.sh +@@ -17,10 +17,10 @@ echo "OBJNAME: $OBJNAME" + echo "LOADPUBLIC: $LOADPUBLIC" + + # Create temporary directory for tokens +-install -d -m 0755 $TESTDIR/db ++install -d -m 0755 "$TESTDIR/db" + + # Create SoftHSM configuration file +-cat >$TESTDIR/softhsm.conf <"$TESTDIR/softhsm.conf" <