- updated to 2.4.2
This commit is contained in:
parent
c8eb0771d0
commit
999348398b
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,3 +5,4 @@ libica-2.0.3.tar.gz
|
||||
/libica-2.1.1.tar.gz
|
||||
/libica-2.2.0.tar.gz
|
||||
/libica-2.3.0.tar.gz
|
||||
/libica-2.4.2.tgz
|
||||
|
@ -1,72 +0,0 @@
|
||||
From 0ce5ef52839237b852e75ab5f11121beedd7eca1 Mon Sep 17 00:00:00 2001
|
||||
From: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
|
||||
Date: Tue, 11 Mar 2014 16:42:26 +0100
|
||||
Subject: [PATCH] AES_CCM: fixed 64/31 bit compatibility
|
||||
|
||||
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
|
||||
---
|
||||
src/ica_api.c | 2 +-
|
||||
src/s390_ccm.c | 10 +++++-----
|
||||
2 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/ica_api.c b/src/ica_api.c
|
||||
index 4939675..7649e4c 100644
|
||||
--- a/src/ica_api.c
|
||||
+++ b/src/ica_api.c
|
||||
@@ -248,7 +248,7 @@ static unsigned int check_ccm_parms(unsigned long payload_length,
|
||||
* is only limited by the value range of its data type unsigned long
|
||||
* and need no further checking */
|
||||
if ((nonce_length > S390_CCM_MIN_NONCE_LENGTH) &&
|
||||
- (payload_length > ((1ul << (8*(15-nonce_length))))))
|
||||
+ (payload_length > ((1ull << (8*(15-nonce_length))))))
|
||||
return EINVAL;
|
||||
|
||||
if (mac == NULL)
|
||||
diff --git a/src/s390_ccm.c b/src/s390_ccm.c
|
||||
index 1503ea9..f61dc30 100644
|
||||
--- a/src/s390_ccm.c
|
||||
+++ b/src/s390_ccm.c
|
||||
@@ -68,7 +68,7 @@ static inline unsigned int fc_to_key_length(unsigned int function_code)
|
||||
static inline void __compute_meta_b0(const unsigned char *nonce,
|
||||
unsigned long nonce_length,
|
||||
unsigned long assoc_data_length,
|
||||
- unsigned long payload_length,
|
||||
+ uint64_t payload_length,
|
||||
unsigned long mac_length,
|
||||
unsigned char *meta_b0)
|
||||
{
|
||||
@@ -122,7 +122,7 @@ static inline void __compute_initial_ctr(const unsigned char *nonce,
|
||||
|
||||
static inline unsigned int __auth_assoc_data(unsigned int function_code,
|
||||
const unsigned char *assoc_data,
|
||||
- unsigned long assoc_data_length,
|
||||
+ uint64_t assoc_data_length,
|
||||
const unsigned char *key,
|
||||
unsigned int key_length,
|
||||
unsigned char *iv)
|
||||
@@ -138,11 +138,11 @@ static inline unsigned int __auth_assoc_data(unsigned int function_code,
|
||||
unsigned long tail_length;
|
||||
|
||||
/* preparing first block of assoc_data */
|
||||
- if (assoc_data_length < ((1ul << 16)-(1ul << 8))) {
|
||||
+ if (assoc_data_length < ((1ull << 16)-(1ull << 8))) {
|
||||
meta.small.length = assoc_data_length;
|
||||
meta_data = meta.small.data;
|
||||
meta_data_length = sizeof(meta.small.data);
|
||||
- } else if (assoc_data_length < (1ul << 32)) {
|
||||
+ } else if (assoc_data_length < (1ull << 32)) {
|
||||
meta.medium.prefix[0] = 0xff;
|
||||
meta.medium.prefix[1] = 0xfe;
|
||||
meta.medium.length = assoc_data_length;
|
||||
@@ -213,7 +213,7 @@ static inline unsigned int __auth_assoc_data(unsigned int function_code,
|
||||
|
||||
static unsigned int s390_ccm_authenticate(unsigned int function_code,
|
||||
const unsigned char *payload,
|
||||
- unsigned long payload_length,
|
||||
+ uint64_t payload_length,
|
||||
const unsigned char *assoc_data,
|
||||
unsigned long assoc_data_length,
|
||||
const unsigned char *nonce,
|
||||
--
|
||||
1.8.5.3
|
||||
|
@ -1,25 +0,0 @@
|
||||
diff -up libica-2.3.0/configure.in.version libica-2.3.0/configure.in
|
||||
--- libica-2.3.0/configure.in.version 2013-03-20 10:58:27.000000000 +0100
|
||||
+++ libica-2.3.0/configure.in 2013-05-03 10:08:28.000000000 +0200
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
AC_INIT(libica, 2.3.0, ingo.tuchscherer@linux.vnet.ibm.com)
|
||||
|
||||
+LIBICA_API=2.0
|
||||
+AC_SUBST(LIBICA_API)
|
||||
+
|
||||
cmdline_CFLAGS="$CFLAGS"
|
||||
|
||||
# Compute $target
|
||||
diff -up libica-2.3.0/src/Makefile.am.version libica-2.3.0/src/Makefile.am
|
||||
--- libica-2.3.0/src/Makefile.am.version 2012-04-23 15:07:21.000000000 +0200
|
||||
+++ libica-2.3.0/src/Makefile.am 2013-05-03 10:08:03.000000000 +0200
|
||||
@@ -2,7 +2,7 @@ INCLUDES = -I ./include -I ../include
|
||||
|
||||
lib_LTLIBRARIES = libica.la
|
||||
|
||||
-libica_la_LDFLAGS = -release $(PACKAGE_VERSION) -lrt -lcrypto
|
||||
+libica_la_LDFLAGS = -release $(LIBICA_API) -lrt -lcrypto
|
||||
|
||||
libica_la_SOURCES = icalinux.c ica_api.c init.c icastats_shared.c \
|
||||
s390_rsa.c s390_crypto.c s390_common.c s390_des.c \
|
40
libica-2.4-version.patch
Normal file
40
libica-2.4-version.patch
Normal file
@ -0,0 +1,40 @@
|
||||
From 3edb86b1057f98bb70017f7998532c62e60ead12 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
|
||||
Date: Mon, 4 Jul 2011 17:19:28 +0200
|
||||
Subject: [libica PATCH] use a new variable for tracking the API version
|
||||
|
||||
---
|
||||
configure.in | 3 +++
|
||||
src/Makefile.am | 2 +-
|
||||
2 files changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.in b/configure.in
|
||||
index 241ab0d..caa17bc 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
AC_INIT(libica, 2.4.0, ingo.tuchscherer@linux.vnet.ibm.com)
|
||||
|
||||
+LIBICA_API=2.0
|
||||
+AC_SUBST(LIBICA_API)
|
||||
+
|
||||
cmdline_CFLAGS="$CFLAGS"
|
||||
|
||||
# Compute $target
|
||||
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||
index 98fe2e8..df4ee1b 100644
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -2,7 +2,7 @@ INCLUDES = -I ./include -I ../include
|
||||
|
||||
lib_LTLIBRARIES = libica.la
|
||||
|
||||
-libica_la_LDFLAGS = -version-number 2:4:0 $(PACKAGE_VERSION) -lrt -lcrypto
|
||||
+libica_la_LDFLAGS = -release $(LIBICA_API) -lrt -lcrypto
|
||||
|
||||
libica_la_SOURCES = icalinux.c ica_api.c init.c icastats_shared.c \
|
||||
s390_rsa.c s390_crypto.c s390_common.c s390_des.c \
|
||||
--
|
||||
1.9.3
|
||||
|
19
libica.spec
19
libica.spec
@ -1,15 +1,13 @@
|
||||
Summary: Library for accessing ICA hardware crypto on IBM zSeries
|
||||
Name: libica
|
||||
Version: 2.3.0
|
||||
Release: 5%{?dist}
|
||||
Version: 2.4.2
|
||||
Release: 1%{?dist}
|
||||
License: CPL
|
||||
Group: System Environment/Libraries
|
||||
URL: http://sourceforge.net/projects/opencryptoki/
|
||||
Source0: http://downloads.sourceforge.net/opencryptoki/%{name}-%{version}.tar.gz
|
||||
Source0: http://downloads.sourceforge.net/opencryptoki/%{name}-%{version}.tgz
|
||||
# soname backwards compatibility
|
||||
Patch0: %{name}-2.3-version.patch
|
||||
# post-release fixes
|
||||
Patch1: %{name}-2.3-fixes.patch
|
||||
Patch0: %{name}-2.4-version.patch
|
||||
# fix build with recent kernels
|
||||
Patch2: %{name}-2.3-zcrypt.patch
|
||||
BuildRequires: openssl-devel
|
||||
@ -39,15 +37,11 @@ IBM zSeries.
|
||||
%setup -q -n %{name}-%{version}
|
||||
|
||||
%patch0 -p1 -b .version
|
||||
%patch1 -p1 -b .fixes
|
||||
%patch2 -p1 -b .zcrypt
|
||||
|
||||
# fix EOLs
|
||||
sed -i -e 's/\r//g' LICENSE
|
||||
|
||||
# cleanup source archive
|
||||
rm src/*.o src/*.la
|
||||
|
||||
sh ./bootstrap.sh
|
||||
|
||||
|
||||
@ -72,6 +66,8 @@ rm $RPM_BUILD_ROOT%{_libdir}/libica.la
|
||||
%{_bindir}/icainfo
|
||||
%{_bindir}/icastats
|
||||
%{_libdir}/libica-2.0.so
|
||||
%{_mandir}/man1/icainfo.1*
|
||||
%{_mandir}/man1/icastats.1*
|
||||
|
||||
%files devel
|
||||
%{_includedir}/*
|
||||
@ -79,6 +75,9 @@ rm $RPM_BUILD_ROOT%{_libdir}/libica.la
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Sep 01 2014 Dan Horák <dan[at]danny.cz> - 2.4.2-1
|
||||
- updated to 2.4.2
|
||||
|
||||
* Wed Jun 11 2014 Dan Horák <dan[at]danny.cz> - 2.3.0-5
|
||||
- fix build with recent kernels
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user