From 203bed3bd17a0b9e6eac50a071242d9616d2a7bb Mon Sep 17 00:00:00 2001 From: rcritten <> Date: Thu, 18 Aug 2005 13:44:33 +0000 Subject: 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. --- nss_pcache.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'nss_pcache.c') diff --git a/nss_pcache.c b/nss_pcache.c index 7157a1e..e6e1966 100644 --- a/nss_pcache.c +++ b/nss_pcache.c @@ -146,14 +146,12 @@ 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) { -- cgit