summaryrefslogtreecommitdiffstats
path: root/nss_pcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'nss_pcache.c')
-rw-r--r--nss_pcache.c7
1 files changed, 7 insertions, 0 deletions
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); */