Accepting request 632587 from security:tls

- Added the following patches for bsc#1097463
  * openssl-ibmca-sles15-Switch-to-ibmca.so-filename-to-allow-a-standalone-us.patch
  * openssl-ibmca-sles15-Fix-lib-name-in-test-code.patch
  * openssl-ibmca-sles15-Update-lib-name-in-documentation.patch

OBS-URL: https://build.opensuse.org/request/show/632587
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/openssl-ibmca?expand=0&rev=29
This commit is contained in:
Dominique Leuenberger 2018-09-03 08:35:56 +00:00 committed by Git OBS Bridge
parent 3ad348f09a
commit 7df611aa44
5 changed files with 163 additions and 3 deletions

View File

@ -0,0 +1,26 @@
From 08d8261f3a39ae248a8f919af6b9b337f7ba0975 Mon Sep 17 00:00:00 2001
From: Eduardo Barretto <ebarretto@linux.vnet.ibm.com>
Date: Thu, 25 Jan 2018 13:11:53 -0200
Subject: [PATCH 01/32] Fix lib name in test code
Signed-off-by: Eduardo Barretto <ebarretto@linux.vnet.ibm.com>
---
src/test/ibmca_mechaList_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/test/ibmca_mechaList_test.c b/src/test/ibmca_mechaList_test.c
index f34d5aa..527bb89 100644
--- a/src/test/ibmca_mechaList_test.c
+++ b/src/test/ibmca_mechaList_test.c
@@ -38,7 +38,7 @@ typedef struct{
} id_map;
#define AP_PATH "/sys/devices/ap"
-#define IBMCA_PATH "/usr/lib64/openssl/engines/libibmca.so"
+#define IBMCA_PATH "/usr/lib64/openssl/engines/ibmca.so"
id_map ica_to_ssl_map[] = {
--
2.13.7

View File

@ -0,0 +1,50 @@
From 29c3157a895e8c6428100a3c0229fb405a978137 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Wed, 17 Jan 2018 13:52:02 +0100
Subject: [PATCH 79/79] switch to ibmca.so filename to allow a standalone use
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Dan Horák <dan@danny.cz>
---
src/Makefile.am | 10 +++++-----
src/openssl.cnf.sample | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 58e7f4e..ff27458 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,10 +1,10 @@
-lib_LTLIBRARIES=libibmca.la
+lib_LTLIBRARIES=ibmca.la
-libibmca_la_SOURCES=e_ibmca.c e_ibmca_err.c
-libibmca_la_LIBADD=-ldl
-libibmca_la_LDFLAGS=-module -version-info 0:2:0 -shared -no-undefined -avoid-version
+ibmca_la_SOURCES=e_ibmca.c e_ibmca_err.c
+ibmca_la_LIBADD=-ldl
+ibmca_la_LDFLAGS=-module -version-info 0:2:0 -shared -no-undefined -avoid-version
-dist_libibmca_la_SOURCES=e_ibmca_err.h e_os.h cryptlib.h
+dist_ibmca_la_SOURCES=e_ibmca_err.h e_os.h cryptlib.h
EXTRA_DIST = openssl.cnf.sample
ACLOCAL_AMFLAGS = -I m4
diff --git a/src/openssl.cnf.sample b/src/openssl.cnf.sample
index 0094864..e483686 100644
--- a/src/openssl.cnf.sample
+++ b/src/openssl.cnf.sample
@@ -23,7 +23,7 @@ ibmca = ibmca_section
# The openssl engine path for libibmca.so.
# Set the dynamic_path to where the libibmca.so engine
# resides on the system.
-dynamic_path = /usr/local/lib/libibmca.so
+dynamic_path = /usr/local/lib/ibmca.so
engine_id = ibmca
init = 1
--
2.13.7

View File

@ -0,0 +1,69 @@
From ba9bef46d233314d34124bee1306b4335b8d0b42 Mon Sep 17 00:00:00 2001
From: Eduardo Barretto <ebarretto@linux.vnet.ibm.com>
Date: Thu, 25 Jan 2018 13:11:19 -0200
Subject: [PATCH 01/33] Update lib name in documentation
Signed-off-by: Eduardo Barretto <ebarretto@linux.vnet.ibm.com>
---
README.md | 8 ++++----
src/doc/ibmca.man | 2 +-
src/openssl.cnf.sample | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/README.md b/README.md
index b3f3501..7c0bdec 100644
--- a/README.md
+++ b/README.md
@@ -27,8 +27,8 @@ $ sudo make install
```
This will configure, build and install the package in a default location,
-which is `/usr/local/lib`. It means that the libibmca.so will be installed in
-`/usr/local/lib/libibmca.so` by default. If you want to install it anywhere
+which is `/usr/local/lib`. It means that the ibmca.so will be installed in
+`/usr/local/lib/ibmca.so` by default. If you want to install it anywhere
else, run "configure" passing the new location via prefix argument, for
example:
@@ -48,8 +48,8 @@ in the host by the OpenSSL package. **WARNING:** you may want to save the
original `openssl.cnf` file before changing it.
In `openssl.cnf.sample`, the *dynamic_path* variable is set to the default
-location, which is `/usr/local/lib/libibmca.so` by default. However, if the
-libibmca.so library has been installed anywhere else, then update the
+location, which is `/usr/local/lib/ibmca.so` by default. However, if the
+ibmca.so library has been installed anywhere else, then update the
*dynamic_path* variable.
Locate where the `openssl.cnf` file has been installed in the host and append
diff --git a/src/doc/ibmca.man b/src/doc/ibmca.man
index dd163b5..9ec08bc 100644
--- a/src/doc/ibmca.man
+++ b/src/doc/ibmca.man
@@ -24,7 +24,7 @@ discover control commands.
Options for the IBMCA section in openssl.cnf:
.PP
dynamic_path =
-.I /path/to/libibmca.so
+.I /path/to/ibmca.so
.RS
Set the path to the IBMCA shared object file allowing OpenSSL to find the file.
.RE
diff --git a/src/openssl.cnf.sample b/src/openssl.cnf.sample
index e483686..e24dad4 100644
--- a/src/openssl.cnf.sample
+++ b/src/openssl.cnf.sample
@@ -20,8 +20,8 @@ ibmca = ibmca_section
[ibmca_section]
-# The openssl engine path for libibmca.so.
-# Set the dynamic_path to where the libibmca.so engine
+# The openssl engine path for ibmca.so.
+# Set the dynamic_path to where the ibmca.so engine
# resides on the system.
dynamic_path = /usr/local/lib/ibmca.so
engine_id = ibmca
--
2.13.7

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Fri Aug 31 19:37:39 UTC 2018 - mpost@suse.com
- Added the following patches for bsc#1097463
* openssl-ibmca-sles15-Switch-to-ibmca.so-filename-to-allow-a-standalone-us.patch
* openssl-ibmca-sles15-Fix-lib-name-in-test-code.patch
* openssl-ibmca-sles15-Update-lib-name-in-documentation.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Sep 22 18:07:10 UTC 2017 - mpost@suse.com Fri Sep 22 18:07:10 UTC 2017 - mpost@suse.com

View File

@ -1,7 +1,7 @@
# #
# spec file for package openssl-ibmca # spec file for package openssl-ibmca
# #
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -25,6 +25,10 @@ Group: Hardware/Other
Url: https://github.com/opencryptoki/openssl-ibmca/ Url: https://github.com/opencryptoki/openssl-ibmca/
Source: openssl-ibmca-%{version}.tar.gz Source: openssl-ibmca-%{version}.tar.gz
Source1: baselibs.conf Source1: baselibs.conf
Patch1: openssl-ibmca-sles15-Switch-to-ibmca.so-filename-to-allow-a-standalone-us.patch
Patch2: openssl-ibmca-sles15-Fix-lib-name-in-test-code.patch
Patch3: openssl-ibmca-sles15-Update-lib-name-in-documentation.patch
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
BuildRequires: libica-devel >= 3.1.1 BuildRequires: libica-devel >= 3.1.1
@ -41,6 +45,9 @@ IBM eServer Cryptographic Accelerator (ICA).
%prep %prep
%setup -q %setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build %build
# The directory where crypto engines are located is owned by the libcrypto package. # The directory where crypto engines are located is owned by the libcrypto package.
@ -60,7 +67,7 @@ make %{?_smp_mflags}
sed -i -e "/^dynamic_path/s, = .*/, = %{_ENGINE_DIR}/," src/openssl.cnf.sample sed -i -e "/^dynamic_path/s, = .*/, = %{_ENGINE_DIR}/," src/openssl.cnf.sample
make %{?_smp_mflags} DESTDIR=%{buildroot} install make %{?_smp_mflags} DESTDIR=%{buildroot} install
rm %{buildroot}/%{_ENGINE_DIR}/libibmca.la rm %{buildroot}/%{_ENGINE_DIR}/ibmca.la
%post %post
#Original fix for bsc#942839 was to update on first install #Original fix for bsc#942839 was to update on first install
@ -114,7 +121,7 @@ fi
%defattr(-, root, root) %defattr(-, root, root)
%doc README.md LICENSE %doc README.md LICENSE
%doc src/openssl.cnf.sample %doc src/openssl.cnf.sample
%{_ENGINE_DIR}/libibmca.* %{_ENGINE_DIR}/ibmca.*
%{_mandir}/man5/ibmca.5%{ext_man} %{_mandir}/man5/ibmca.5%{ext_man}
%changelog %changelog