This morning I commited a X.509 and CMS implementation to the CVS repository that Heimdal uses. Its not added to Heimdal yet, for that it needs more work. The implementation is based on the CMS framework from the PK-INIT code in Heimdal and uses the ASN.1 library from Heimdal. This, together with the PK-INIT and SPNEGO, have been the driving force behind the update of the ASN.1 library.
It diffrent from the other common free implementation (read OpenSSL) because it centers around the certificate instead of the public/private keys.
Right now it have support for PKCS12, PEM, DER certificate stores, I’ll soon add PKCS11 support.
The CMS interface is somewhat raw, but produces and decodes/verifies SignedData and EnvelopedData. Talking about the interface, I’ll update the API for sure, there needs to be a context variable to pass back errors to the user, com_err might be good, but its not that good.
The reason I started this work is that I found the choices I had to use CMS in PK-INIT was bad and very strange to use. They also didn’t support the operations I need to do, for example search certificates for diffrent critera, use random oids as content types in CMS messages or interface with PKCS11 in a sane way.
Adding PKCS11 support is going to be the intresting part, then I’ll see how much of the API I made up really works with keys that are hiddes inside other devices.
A choice I have to make is what crypto libary I want to support, one way to do it is to use PKCS11 for everything, this way the X.509 and CMS libary will be independent of the crypto support, and the user can choose what crypto provider to use.
The real work is of course adding more tests, its really great to have a large regression testsuite, makes you feel warm inside. Right now there is a small one, but it needs improvements (and for me to commit it).
Technorati tag: Heimdal