openssl-pkcs8

This adds PKCS8 compliant key export to the OpenSSL::PKey::RSA library that is part of standard Ruby distributions.

Example:

key = OpenSSL::PKey::RSA.new(1024)

key.to_pem_pkcs8
# => "-----BEGIN PRIVATE KEY----- ..."

The contents of openssl_pkcs8.c is mostly taken from the Ruby distribution and is licensed under exactly the same terms as the original.

The remainder is © 2012 Scott Tadman, The Working Group Inc. under the MIT License.