Applied epass2003 related patch (#981462)

This commit is contained in:
Nikos Mavrogiannopoulos 2014-01-02 10:12:15 +01:00
parent ff5284e323
commit 9aff48c405
2 changed files with 31 additions and 2 deletions

24
opensc-epass2003.patch Normal file
View File

@ -0,0 +1,24 @@
diff --git a/src/libopensc/card-epass2003.c b/src/libopensc/card-epass2003.c
index 80088b9..6f04573 100644
--- a/src/libopensc/card-epass2003.c
+++ b/src/libopensc/card-epass2003.c
@@ -117,8 +117,8 @@ openssl_enc(const EVP_CIPHER * cipher, const unsigned char *key, const unsigned
memcpy(iv_tmp, iv, EVP_MAX_IV_LENGTH);
EVP_CIPHER_CTX_init(&ctx);
- EVP_CIPHER_CTX_set_padding(&ctx, 0);
EVP_EncryptInit_ex(&ctx, cipher, NULL, key, iv_tmp);
+ EVP_CIPHER_CTX_set_padding(&ctx, 0);
if (!EVP_EncryptUpdate(&ctx, output, &outl, input, length))
goto out;
@@ -146,8 +146,8 @@ openssl_dec(const EVP_CIPHER * cipher, const unsigned char *key, const unsigned
memcpy(iv_tmp, iv, EVP_MAX_IV_LENGTH);
EVP_CIPHER_CTX_init(&ctx);
- EVP_CIPHER_CTX_set_padding(&ctx, 0);
EVP_DecryptInit_ex(&ctx, cipher, NULL, key, iv_tmp);
+ EVP_CIPHER_CTX_set_padding(&ctx, 0);
if (!EVP_DecryptUpdate(&ctx, output, &outl, input, length))
goto out;

View File

@ -1,6 +1,6 @@
Name: opensc
Version: 0.13.0
Release: 8%{?dist}
Release: 9%{?dist}
Summary: Smart card library and applications
Group: System Environment/Libraries
@ -11,6 +11,7 @@ Source1: opensc.module
# Upstream patch for fixing pkcs15 cert length calculation
Patch0: 0001-pkcs15-regression-in-e35febe-compute-cert-length.patch
Patch1: opensc-epass2003.patch
BuildRequires: pcsc-lite-devel
BuildRequires: readline-devel
@ -35,6 +36,7 @@ every software/card that does so, too.
%prep
%setup -q
%patch0 -p1 -b .cert_length
%patch1 -p1 -b .epass2003
sed -i -e 's|"/lib /usr/lib\b|"/%{_lib} %{_libdir}|' configure # lib64 rpaths
cp -p src/pkcs15init/README ./README.pkcs15init
@ -121,7 +123,10 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libsmm-local.so
%changelog
* Wed Dec 23 2013 Nikos Mavrogiannopoulos <nmav@redhat.com> - 0.13.0-8
* Thu Jan 02 2014 Nikos Mavrogiannopoulos <nmav@redhat.com> - 0.13.0-9
- Applied epass2003 related patch (#981462)
* Mon Dec 23 2013 Nikos Mavrogiannopoulos <nmav@redhat.com> - 0.13.0-8
- Compile using the --enable-sm option (related but does not fix #981462)
* Wed Dec 18 2013 Nikos Mavrogiannopoulos <nmav@redhat.com> - 0.13.0-7