Helper methods and objects to make working with the Ruby OpenSSL library more intuitive.
Clone or download
Latest commit 6efb4d3 Jun 12, 2013

OpenSSL Extensions

Gem Version Build Status Code Climate

This library generally provides helper methods which makes working with OpenSSL a little more bearable. It does, however, provide some additional structures (such as a CertificateChain) which extend the traditional features of the library.


With Bundler:

gem 'openssl-extensions', :require => 'openssl-extensions/all'

With standard RubyGems:

gem install openssl-extensions
require 'rubygems'
require 'openssl-extensions/all'

Once required, the extensions are automatically applied.


In general, this extension library should be somewhat transparent to you. It does not directly provide many classes with which you might interact. Instead, it extends the current classes provided by Ruby's OpenSSL library (being OpenSSL::X509::Request, OpenSSL::X509::Certificate, and OpenSSL::X509::NAME).

Below is a simple example exercising a few helpers provided by this library:

csr_body ='example.csr') # assuming this is valid and exists
request =
request.subject.common_name         # => ""
request.subject.organization        # => "Example Corp"
request.subject.locality            # => "Orlando"
request.subject.region              # => "Florida"             # => "US"
request.subject.location            # => "Orlando, Florida, US"
request.strength                    # => 2048
request.challenge_password?         # => false
request.subject_alternative_names   # => ['', '']

Supported Ruby Implementations

This OpenSSL extension library currently supports (and is continuously tested against) the following Ruby implementations:

The following implementations are known to be incompatible:


Released under the MIT License. See the LICENSE file for further details.