I need to be able to export PKCS8 formatted public keys from Ruby
through the OpenSSL library but so far the only way I've found to do
this is to either spin up the openssl command to do the heavy lifting,
or to make a horrible hack to do it using the OpenSSL library
(https://github.com/twg/openssl_pkcs8).

Unfortunately this hack only works in earlier versions of Ruby 1.9.3 and
I can't seem to figure out the problem in Ruby 2.0.0, it just segfaults.
This is curious since the OpenSSL code for Ruby 2.0 looks largely
unchanged when it comes to emitting PEM-formatted keys. I'm not sure it
should be a necessary thing, though, as the OpenSSL library supports
PKCS5, PKCS7 and PKCS12 formats, just not PKCS8.

The reason I need this is PKCS8 is the standard used by the DKIM to
publish keys through DNS TXT records.
(http://dkimcore.org/specification.html)

Is there any way to get this sort of thing built into the core OpenSSL
library? I don't mind doing the implementation work, but I'm just not
sure who to contact or how to go about doing this sort of thing.

-- 
Posted via http://www.ruby-forum.com/.