Blob Blame History Raw
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 <klausk@linux.vnet.ibm.com>

 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 <klausk@linux.vnet.ibm.com>
---
 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