Helper methods and objects to make working with the Ruby OpenSSL library more intuitive.
Latest commit 6efb4d3 Jun 11, 2013 @nbibler nbibler 1.2.1 release
Failed to load latest commit information.
autotest Initial commit Oct 1, 2010
lib 1.2.1 release Jun 11, 2013
spec Fix certificate key strength calculation with DSA keys. Jun 11, 2013
.gitignore Remove Ruby version settings files. Jun 7, 2013
.rspec Update gemspec format and dependencies. Jun 7, 2013
.travis.yml 1.2.1 release Jun 11, 2013
Gemfile Updated development dependencies. Nov 18, 2010
LICENSE Added CHANGELOG, README, and LICENSE. Jan 7, 2011 Add gem badges. Jun 7, 2013
Rakefile Update Rakefile. Jun 7, 2013
openssl-extensions.gemspec Update gemspec format and dependencies. Jun 7, 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.