Dave Townsend wrote, On 2008-05-28 15:08: > Wan-Teh Chang wrote: >> It seems that if the private key already exists, we modify its attributes: Yes.
> The attribute type is 3584088832. This is with NSS_3_12_RC3 3584088832 is 0xD5A0DB00 which is CKA_NETSCAPE_DB. See > http://lxr.mozilla.org/security/source/security/nss/lib/softoken/pkcs11n.h#154 It contains the public value of a DSA key. Were you trying to import a DSA key? lg_FindRSAPrivateKeyAttribute doesn't handle that case. Looks like an oversight. Probably a bug. Also, I'm guessing, probably a regression in 3.12. Can you try it with 3.11.x? Does it work there? > #0 0x1628beee in lg_FindRSAPrivateKeyAttribute at lgattr.c:868 > #1 0x1628c870 in lg_FindPrivateKeyAttribute at lgattr.c:1034 > #2 0x1628d8f4 in lg_GetSingleAttribute at lgattr.c:1364 > #3 0x1628e0a7 in lg_SetSingleAttribute at lgattr.c:1697 > #4 0x1628e264 in lg_SetAttributeValue at lgattr.c:1754 > #5 0x002c3410 in sftkdb_setAttributeValue at sftkdb.c:835 > #6 0x002c35db in sftkdb_write at sftkdb.c:891 > #7 0x002a7a7e in sftk_handlePrivateKeyObject at pkcs11.c:1072 > #8 0x002a80ed in sftk_handleKeyObject at pkcs11.c:1251 > #9 0x002a8756 in sftk_handleObject at pkcs11.c:1469 > #10 0x002ac673 in NSC_CreateObject at pkcs11.c:3612 > #11 0x0032769c in PK11_CreateNewObject at pk11obj.c:412 > #12 0x0032f0fe in PK11_ImportAndReturnPrivateKey at pk11pk12.c:439 > #13 0x0032f3ec in PK11_ImportPrivateKeyInfoAndReturnKey at pk11pk12.c:544 > #14 0x0032e88c in PK11_ImportDERPrivateKeyInfoAndReturnKey at pk11pk12.c:271 Thanks Dave, this is very helpful. _______________________________________________ dev-tech-crypto mailing list dev-tech-crypto@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-tech-crypto