Bug 62329 - Refactor trust module internals
Summary: Refactor trust module internals
Status: RESOLVED FIXED
Alias: None
Product: p11-glue
Classification: Unclassified
Component: p11-kit (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Stef Walter
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-14 09:44 UTC by Stef Walter
Modified: 2013-03-19 13:56 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
asn1: Implement a parsed ASN.1 tree cache (6.79 KB, patch)
2013-03-15 17:00 UTC, Stef Walter
Details | Splinter Review
attrs: New p11_attrs_merge() function (7.02 KB, patch)
2013-03-15 17:00 UTC, Stef Walter
Details | Splinter Review
trust: Refactor to include concept of the index (71.46 KB, patch)
2013-03-15 17:00 UTC, Stef Walter
Details | Splinter Review
attrs: Add info functions for constant names and values (27.10 KB, patch)
2013-03-15 17:00 UTC, Stef Walter
Details | Splinter Review
trust: Add a builder which builds objects out of parsed data (202.68 KB, patch)
2013-03-15 17:00 UTC, Stef Walter
Details | Splinter Review
trust: Use a SHA-1 hash of subjectPublicKeyInfo as CKA_ID by default (17.82 KB, patch)
2013-03-15 17:00 UTC, Stef Walter
Details | Splinter Review

Description Stef Walter 2013-03-14 09:44:11 UTC
In order to solve bug #62156, and have an format for storing arbitrary objects, we need to refactor the p11-kit trust module internals somewhat. 

This means quite a bit of change, but it's done with the concept of future modifications written through the module.
Comment 1 Stef Walter 2013-03-14 09:47:41 UTC
Two basic concepts are introduced here:

The index
 * index is where objects are stored and searched for internally.

The builder
 * The builder is what validates and completes incomplete objects. For example
   if a certificate is loaded, all the various PKCS#11 attributes that weren't
   specified by the input format, are built out by the builder.
 * The builder also builds the compat objects (like NSS trust objects) from
   the input data, and keeps them in sync with what's coming in.
 * This replaces the previous code in adapter.c and parser.c which did some
   of this building.

In all the goal of the above is to:
 * Allow importing/validation of arbitrary objects from our own storage format.
 * Allow reloading the input directory when it changes.
 * Allow modification of objects through the module, which is necessary for
   writing tools that operate on these objects.
Comment 2 Stef Walter 2013-03-15 17:00:15 UTC
Created attachment 76576 [details] [review]
asn1: Implement a parsed ASN.1 tree cache
Comment 3 Stef Walter 2013-03-15 17:00:16 UTC
Created attachment 76577 [details] [review]
attrs: New p11_attrs_merge() function
Comment 4 Stef Walter 2013-03-15 17:00:21 UTC
Created attachment 76578 [details] [review]
trust: Refactor to include concept of the index
Comment 5 Stef Walter 2013-03-15 17:00:24 UTC
Created attachment 76579 [details] [review]
attrs: Add info functions for constant names and values
Comment 6 Stef Walter 2013-03-15 17:00:33 UTC
Created attachment 76580 [details] [review]
trust: Add a builder which builds objects out of parsed data
Comment 7 Stef Walter 2013-03-15 17:00:37 UTC
Created attachment 76581 [details] [review]
trust: Use a SHA-1 hash of subjectPublicKeyInfo as CKA_ID by default
Comment 8 Stef Walter 2013-03-19 13:56:27 UTC
Merged into git master and 0.17.x releases.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.