summaryrefslogtreecommitdiffstats
path: root/nss_pcache.c
diff options
context:
space:
mode:
authorrcritten <>2005-08-18 13:44:33 +0000
committerrcritten <>2005-08-18 13:44:33 +0000
commit203bed3bd17a0b9e6eac50a071242d9616d2a7bb (patch)
tree51143afad9249d64d889eea9d0b32fa54fe616d9 /nss_pcache.c
parentbb9b72e3fbffa8364ca63e33ce5185066ae0c427 (diff)
downloadmod_nss-203bed3bd17a0b9e6eac50a071242d9616d2a7bb.tar.gz
mod_nss-203bed3bd17a0b9e6eac50a071242d9616d2a7bb.tar.xz
mod_nss-203bed3bd17a0b9e6eac50a071242d9616d2a7bb.zip
More correct detection of NSS version when determining whether we
should expect PK11_TokenKeyGenWithFlags(). It hasn't been included as of NSS 3.10.0.
Diffstat (limited to 'nss_pcache.c')
-rw-r--r--nss_pcache.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/nss_pcache.c b/nss_pcache.c
index 7157a1e..e6e1966 100644
--- a/nss_pcache.c
+++ b/nss_pcache.c
@@ -146,15 +146,13 @@ 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
+#if NSS_VMAJOR >= 3 && (NSS_VMINOR <= 9 || (NSS_VMINOR <= 10 && NSS_VPATCH == 0))
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); */