From 53b6bc9d5645cbdce5751bc8e8f40968ce010ccb Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Mon, 7 Sep 2009 12:53:02 +0000 Subject: [PATCH] - Added opencryptoki-2.3.0-fix-nss-breakage.patch on upstream request. --- opencryptoki-2.3.0-fix-nss-breakage.patch | 39 +++++++++++++++++++++++ opencryptoki.spec | 7 +++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 opencryptoki-2.3.0-fix-nss-breakage.patch diff --git a/opencryptoki-2.3.0-fix-nss-breakage.patch b/opencryptoki-2.3.0-fix-nss-breakage.patch new file mode 100644 index 0000000..605c840 --- /dev/null +++ b/opencryptoki-2.3.0-fix-nss-breakage.patch @@ -0,0 +1,39 @@ +Rajiv Andrade kindly asked me to apply this patch. +It's committed in upstream CVS since 2009-09-04. +-- Michal + +Subject: [PATCH] Fix NSS breakage, don't change caller's C_Initialize args +From: Klaus Heinrich Kiwi + + Setting CKF_SERIAL_SESSION bit on CK_C_INITIALIZE_ARGS struct passed + by the caller is breaking at least one outstanding PKCS#11 user: NSS, + which qualifies this field as 'const'. + PKCS#11 standard doesn't specify this as a const field, but this + particular flag is depracated anyway and openCryptoki doesn't + really care for it, so leaving it alone won't probably cause any + harm. + + +Signed-off-by: Klaus Heinrich Kiwi +--- + usr/lib/pkcs11/api/api_interface.c | 5 ----- + 1 files changed, 0 insertions(+), 5 deletions(-) + +diff --git a/usr/lib/pkcs11/api/api_interface.c b/usr/lib/pkcs11/api/api_interface.c +index 57519d4..dabd711 100755 +--- a/usr/lib/pkcs11/api/api_interface.c ++++ b/usr/lib/pkcs11/api/api_interface.c +@@ -3324,11 +3324,6 @@ C_Initialize ( CK_VOID_PTR pVoid ) + LOGIT(LOG_DEBUG,"Can't create OS threads.... This is OK"); + } + +- /* CFK_SERIAL_SESSION is deprecated, so we should just turn +- * it on within the code automatically, instead of requiring +- * the application to do it. */ +- pArg->flags |= CKF_SERIAL_SESSION; +- + // Since this is an initialization path, we will be verbose in the + // code rather than efficient. + // +-- +1.6.2.5 diff --git a/opencryptoki.spec b/opencryptoki.spec index f6bdc32..124cd51 100644 --- a/opencryptoki.spec +++ b/opencryptoki.spec @@ -1,12 +1,13 @@ Name: opencryptoki Summary: Implementation of the PKCS#11 (Cryptoki) specification v2.11 Version: 2.3.0 -Release: 3%{?dist} +Release: 4%{?dist} License: CPL Group: System Environment/Base URL: http://sourceforge.net/projects/opencryptoki Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz Patch0: %{name}-2.2.8-do-not-create-group-in-pkcs11_startup.patch +Patch1: %{name}-2.3.0-fix-nss-breakage.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) Requires(pre): shadow-utils coreutils sed Requires(post): chkconfig @@ -46,6 +47,7 @@ based applications. %prep %setup -q %patch0 -p1 +%patch1 -p1 %build # Upstream tarball has unnecessary executable perms set on the sources @@ -136,6 +138,9 @@ exit 0 %changelog +* Mon Sep 07 2009 Michal Schmidt 2.3.0-4 +- Added opencryptoki-2.3.0-fix-nss-breakage.patch on upstream request. + * Fri Aug 21 2009 Tomas Mraz - 2.3.0-3 - rebuilt with new openssl