From 7dde1715ae5dc5f15b4fc1c1c9489f7e4caff23f Mon Sep 17 00:00:00 2001 From: Alex Dupre Date: Thu, 20 May 2010 10:01:55 +0000 Subject: A bunch of changes for the SQLITE3 backend: 1) fix for bug #528467 (C_UnwrapKey didn't work with DSA and EC private keys) 2) fix for bug #526231 (C_GetAttributeValue didn't correctly work) 3) partial fix for bug #564011 (object ID race on keypairgen) 4) use sqlite3 in ports (there is no reason to compile the bundled one) Approved by: no objections by marcus and gnome team --- security/nss/files/patch-lib_softoken_sftkdb.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 security/nss/files/patch-lib_softoken_sftkdb.c (limited to 'security/nss/files/patch-lib_softoken_sftkdb.c') diff --git a/security/nss/files/patch-lib_softoken_sftkdb.c b/security/nss/files/patch-lib_softoken_sftkdb.c new file mode 100644 index 000000000000..494ea115fe83 --- /dev/null +++ b/security/nss/files/patch-lib_softoken_sftkdb.c @@ -0,0 +1,26 @@ +--- lib/softoken/sftkdb.c.orig 2010-05-18 16:12:16.000000000 +0200 ++++ lib/softoken/sftkdb.c 2010-05-18 16:14:37.000000000 +0200 +@@ -766,6 +766,11 @@ + if (attr == NULL) { + return CKR_TEMPLATE_INCOMPLETE; + } ++ if (attr->ulValueLen == 0) { ++ /* key is to generic to determine that it's unique, usually ++ * happens in the key gen case */ ++ return CKR_OBJECT_HANDLE_INVALID; ++ } + findTemplate[1] = *attr; + count = 2; + break; +@@ -827,6 +832,11 @@ + } + crv = sftkdb_getFindTemplate(objectType, objTypeData, + findTemplate, &count, ptemplate, len); ++ if (crv == CKR_OBJECT_HANDLE_INVALID) { ++ /* key is to generic to determine that it's unique, usually ++ * happens in the key gen case, go ahead and just create it */ ++ return CKR_OK; ++ } + if (crv != CKR_OK) { + return crv; + } -- cgit v1.2.3