[Pkg-fedora-ds-maintainers] [libapache2-mod-nss] 22/156: Add in support for older versions of NSS that don't have the function PK11_TokenKeyGenWithFlags(). Older versions of NSS will only work with software certificates when using nss_pcache. The workaround is to store the token passwords in a file instead.

Timo Aaltonen tjaalton-guest at moszumanska.debian.org
Wed Jul 2 13:55:23 UTC 2014


This is an automated email from the git hooks/post-receive script.

tjaalton-guest pushed a commit to branch master
in repository libapache2-mod-nss.

commit c656f456c2792bd399df72749d7cc24c4b0dfdb3
Author: rcritten <>
Date:   Wed Jul 20 18:54:24 2005 +0000

    Add in support for older versions of NSS that don't have the function
    PK11_TokenKeyGenWithFlags(). Older versions of NSS will only work with
    software certificates when using nss_pcache. The workaround is to store
    the token passwords in a file instead.
---
 nss_pcache.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/nss_pcache.c b/nss_pcache.c
index 50f9684..7157a1e 100644
--- a/nss_pcache.c
+++ b/nss_pcache.c
@@ -146,8 +146,15 @@ CreatePk11PinStore(Pk11PinStore **out, const char *tokenName, const char *pin)
         }
 
         /* Generate a key and parameters to do the encryption */
+#if NSS_VMAJOR >= 3
+#if NSS_VMINOR <= 9
+        store->key = PK11_KeyGen(store->slot, store->mech->type,
+                       0, 0, 0);
+#else
         store->key = PK11_TokenKeyGenWithFlags(store->slot, store->mech->type,
                      NULL, 0, NULL, CKF_ENCRYPT|CKF_DECRYPT, PR_FALSE, NULL);
+#endif
+#endif
         if (store->key == 0)
         {
             /* PR_SetError(xxx); */

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-fedora-ds/libapache2-mod-nss.git



More information about the Pkg-fedora-ds-maintainers mailing list