Provides SSL, TLS and general purpose cryptography.
C Ruby Other
Latest commit 7b319d9 Feb 24, 2017 @rhenium rhenium Merge branch 'topic/fix-rdoc-markup'
* topic/fix-rdoc-markup:
  Fix RDoc markup
  Revert r57690 except for read_nonblock
  [DOC] mark up literals
  [DOC] keyword argument _exception_
  [DOC] {read,write}_nonblock with exception: false

OpenSSL for Ruby

Build Status Build status

OpenSSL provides SSL, TLS and general purpose cryptography. It wraps the OpenSSL library.


The openssl gem is available at You can install with:

gem install openssl

You may need to specify the path where OpenSSL is installed.

gem install openssl -- --with-openssl-dir=/opt/openssl

Alternatively, you can install the gem with bundler:

# Gemfile
gem 'openssl'
# or specify git master
gem 'openssl', git: ''

After doing bundle install, you should have the gem installed in your bundle.


Once installed, you can require "openssl" in your application.

require "openssl"

NOTE: If you are using Ruby 2.3 (and not Bundler), you must activate the gem version of openssl, otherwise the default gem packaged with the Ruby installation will be used:

gem "openssl"
require "openssl"




Please read our for instructions.


Security issues should be reported to ruby-core by following the process described on "Security at".