Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
OpenSSL::PKey::RSA extension to export in PKCS8 format.
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
ext/openssl_pkcs8
lib
test
.document
.gitignore
Gemfile
LICENSE.txt
README.rdoc
Rakefile
VERSION
openssl_pkcs8.gemspec

README.rdoc

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----- ..."

This will export the private key in PKCS8 format, and will export public keys in the PUBKEY format used by OpenSSL. Note the absence of “RSA” in both of the headers.

Installation

Using the Gem distribution is probably easiest:

gem install openssl_pkcs8

Copyright

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 (C) 2012 Scott Tadman, The Working Group Inc. under the MIT License.

Something went wrong with that request. Please try again.