diff options
author | Alex Dupre <ale@FreeBSD.org> | 2010-05-20 10:01:55 +0000 |
---|---|---|
committer | Alex Dupre <ale@FreeBSD.org> | 2010-05-20 10:01:55 +0000 |
commit | 7dde1715ae5dc5f15b4fc1c1c9489f7e4caff23f (patch) | |
tree | b86dddae05eb7e96f94ca64acdda0ea1771cd03b /security/nss/files/patch-lib_softoken_sftkdb.c | |
parent | The massXpert project aims at providing (bio)chemists with a software (diff) |
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
Notes
Notes:
svn path=/head/; revision=254639
Diffstat (limited to 'security/nss/files/patch-lib_softoken_sftkdb.c')
-rw-r--r-- | security/nss/files/patch-lib_softoken_sftkdb.c | 26 |
1 files changed, 26 insertions, 0 deletions
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; + } |