Last Comment Bug 401026 - Need to provide a way to modify and create new PKCS #11 objects.
: Need to provide a way to modify and create new PKCS #11 objects.
Status: RESOLVED FIXED
:
Product: NSS
Classification: Components
Component: Libraries (show other bugs)
: trunk
: x86 Linux
: P1 enhancement (vote)
: 3.12
Assigned To: Robert Relyea
:
Mentors:
: 402711 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-10-24 15:43 PDT by Robert Relyea
Modified: 2007-11-09 13:57 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Implement 2 new functions, one to create new attributes and the other to write them. (5.92 KB, patch)
2007-10-24 15:45 PDT, Robert Relyea
julien.pierre: review-
Details | Diff | Review
version2: update comments as requested. (7.55 KB, patch)
2007-10-30 17:12 PDT, Robert Relyea
no flags Details | Diff | Review
v3: all the comments, none of the cruft. (7.56 KB, patch)
2007-10-30 17:27 PDT, Robert Relyea
no flags Details | Diff | Review
4th time's a charm (sigh) (7.55 KB, patch)
2007-10-30 17:31 PDT, Robert Relyea
julien.pierre: review+
Details | Diff | Review

Description Robert Relyea 2007-10-24 15:43:17 PDT
Some applications need to modify PKCS #11 objects directly, particularly management applications for those pkcs #11 modules. We already have a way to fetch generic objects and read their attributes, we also need a way to create objects and modify their attributes.

Currently this is needed for nsscompatossl layer to manage pem file.
Comment 1 Robert Relyea 2007-10-24 15:45:06 PDT
Created attachment 286074 [details] [diff] [review]
Implement 2 new functions, one to create new attributes and the other to write them.
Comment 2 Julien Pierre 2007-10-30 16:55:38 PDT
Comment on attachment 286074 [details] [diff] [review]
Implement 2 new functions, one to create new attributes and the other to write them.

I'm not crazy about the void* objSpec argument for PK11_WriteRawAttribute .
But it looks like the damage was already done in PK11_ReadRawAttribute, so we should make those functions consistent.

Please add some documentation to the header files about the format of objspec, ie. the various structures that PK11ObjectType enum values map to. A good place to put that might be in the enum definition, but the comment for the raw functions should explain that the format of the structure is determined by the type.
Comment 3 Robert Relyea 2007-10-30 17:12:26 PDT
Created attachment 286769 [details] [diff] [review]
version2: update comments as requested.

Update the comments
Comment 4 Robert Relyea 2007-10-30 17:13:51 PDT
Comment on attachment 286769 [details] [diff] [review]
version2: update comments as requested.

This patch as some cruft, obsoleting..
Comment 5 Robert Relyea 2007-10-30 17:27:02 PDT
Created attachment 286772 [details] [diff] [review]
v3: all the comments, none of the cruft.
Comment 6 Robert Relyea 2007-10-30 17:31:14 PDT
Created attachment 286774 [details] [diff] [review]
4th time's a charm (sigh)
Comment 7 Robert Relyea 2007-10-30 17:32:34 PDT
Comment on attachment 286774 [details] [diff] [review]
4th time's a charm (sigh)

ok, julian, this should be it. interdiff will give you the correct diffs, but mislabel the files.
Comment 8 Julien Pierre 2007-10-30 17:40:17 PDT
Comment on attachment 286774 [details] [diff] [review]
4th time's a charm (sigh)

This looks fine. I am not crazy about interdiff anyway. Manual diff of diff works better.
Comment 9 Robert Relyea 2007-11-06 08:57:14 PST
*** Bug 402711 has been marked as a duplicate of this bug. ***
Comment 10 Robert Relyea 2007-11-09 13:57:12 PST
+128/4) Lines changed.
When 	Who 	File 	Rev 	+/- 	Description
2007-10-31 10:25	rrelyea%redhat.com 	mozilla/security/nss/lib/nss/nss.def 	1.181 	2/0  	

Need to provide a way to modify and create new PKCS #11 objects.
bug 401026
r=julien

Implements 2 new functions, one to modify existing pkcs #11 objects, and
another to creat them.
2007-10-31 10:25	rrelyea%redhat.com 	mozilla/security/nss/lib/pk11wrap/pk11obj.c 	1.18 	92/2 
2007-10-31 10:25	rrelyea%redhat.com 	mozilla/security/nss/lib/pk11wrap/pk11pub.h 	1.19 	24/0 
2007-10-31 10:25	rrelyea%redhat.com 	mozilla/security/nss/lib/pk11wrap/secmodi.h 	1.25 	1/1 
2007-10-31 10:25	rrelyea%redhat.com 	mozilla/security/nss/lib/pk11wrap/secmodt.h 	1.34 	9/1 


Note You need to log in before you can comment on or make changes to this bug.