- add post release fix (#1066014)
This commit is contained in:
parent
f106ee9724
commit
bd46a5ce1d
72
libica-2.3-fixes.patch
Normal file
72
libica-2.3-fixes.patch
Normal file
@ -0,0 +1,72 @@
|
||||
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
|
||||
|
12
libica.spec
12
libica.spec
@ -1,13 +1,15 @@
|
||||
Summary: Library for accessing ICA hardware crypto on IBM zSeries
|
||||
Name: libica
|
||||
Version: 2.3.0
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
License: CPL
|
||||
Group: System Environment/Libraries
|
||||
URL: http://sourceforge.net/projects/opencryptoki/
|
||||
Source0: http://downloads.sourceforge.net/opencryptoki/%{name}-%{version}.tar.gz
|
||||
# soname backwards compatibility
|
||||
Patch0: %{name}-2.3-version.patch
|
||||
# post-release fixes
|
||||
Patch1: %{name}-2.3-fixes.patch
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: autoconf automake libtool
|
||||
ExclusiveArch: s390 s390x
|
||||
@ -35,6 +37,7 @@ IBM zSeries.
|
||||
%setup -q -n %{name}-%{version}
|
||||
|
||||
%patch0 -p1 -b .version
|
||||
%patch1 -p1 -b .fixes
|
||||
|
||||
# fix EOLs
|
||||
sed -i -e 's/\r//g' LICENSE
|
||||
@ -73,6 +76,9 @@ rm $RPM_BUILD_ROOT%{_libdir}/libica.la
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Mar 14 2014 Dan Horák <dan[at]danny.cz> - 2.3.0-3
|
||||
- add post release fix (#1066014)
|
||||
|
||||
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||
|
||||
@ -82,7 +88,7 @@ rm $RPM_BUILD_ROOT%{_libdir}/libica.la
|
||||
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
||||
|
||||
* Fri Aug 16 2012 Dan Horák <dan[at]danny.cz> - 2.2.0-1
|
||||
* Fri Aug 17 2012 Dan Horák <dan[at]danny.cz> - 2.2.0-1
|
||||
- updated to 2.2.0
|
||||
|
||||
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.1-2
|
||||
@ -107,7 +113,7 @@ rm $RPM_BUILD_ROOT%{_libdir}/libica.la
|
||||
- Do not use sigill to wrap all HW instructions (#665401)
|
||||
- updated to 2.0.4
|
||||
|
||||
* Tue Nov 8 2010 Dan Horák <dhorak@redhat.com> - 2.0.3-3
|
||||
* Tue Nov 9 2010 Dan Horák <dhorak@redhat.com> - 2.0.3-3
|
||||
- Fix the return value of old_api_sha_test() in libica_sha1_test (#624005)
|
||||
- Use the right buffer length when operating in 32-bit mode (#640035)
|
||||
- Resolves: #624005, #640035
|
||||
|
Loading…
Reference in New Issue
Block a user