The current TPS maintains a blob of pkcs#11 objects that gets modified during token operations such as Format and Enrollment. When the time comes to commit the final operation to the token, this blob is written all at once to the token.
This feature involves support to create, modify and manage these pkcs#11 objects. It also involves the code to write the final blob down to the token.
Decided to work on this one during the "enrollment" ticket. We need to manipulate these objects before even thinking about enrolling a token.
Two things happen:
When a token is to be enrolled, the pkcs11 object data blob is read off of the token if it is already enrolled. This data is zlib compressed on the token, thus it is decompressed when read in. Here this data is parsed and the collection of PKCS#11 objects and their attributes are created.
When new key and cert objects are created to be written to token, these classes are used to add to the data to be written out to the token.
When the enrollment is finalized these objects are de-parsed and turned back into a a compressed blob to be written out.
Progress so far:
All of the code has been written and compiles to do all this. In the middle of testing. The data is being read correctly and the parsing has begun. I'm dealing with some overflow issues in the data since java does not have "unsigned" integer types. As soon as that is smoothed out this functionality should work fine.
Have this working locally. Was pretty difficult to get all the data conversions working correctly in java. Will submit patch.
Bumping to next month. Code done, awaiting review and can close.
Closing after latest commit. We now have basic pkcs#11 object support. There will be a few more methods to write to create specific pkcs#11 objects such as certs and keys, but this base support will make those methods trivial. Those can be part of the enrollment ticket, since they are enrollment specific.
Metadata Update from @jmagne: - Issue assigned to jmagne - Issue set to the milestone: 10.2 - 06/14 (June)
Dogtag PKI is moving from Pagure issues to GitHub issues. This means that existing or new issues will be reported and tracked through Dogtag PKI's GitHub Issue tracker.
This issue has been cloned to GitHub and is available here: https://github.com/dogtagpki/pki/issues/1454
If you want to receive further updates on the issue, please navigate to the GitHub issue and click on Subscribe button.
Subscribe
Thank you for understanding, and we apologize for any inconvenience.