SslCertificate
ssl_certificate is wrapper of OpenSSL::X509::Certificate.
It makes you to handle ssl certificate easier.
Installation
Add this line to your application's Gemfile:
gem 'ssl_certificate'
And then execute:
$ bundle
Or install it yourself as:
$ gem install ssl_certificate
Usage
require 'ssl_certificate'
cert_pem = File.read("spec/test_data/www.example.com.crt")
cert = SslCertificate::Certificate.new(cert_pem)
cert.common_name
cert.alternative_names
key_pem = File.read("spec/test_data/www.example.com.key")
cert.check_private_key_str(key_pem)
cert.check_fqdn("www.example.com")
cert.check_fqdn("hoge.example.com")
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/fshin1988/ssl_certificate.
License
The gem is available as open source under the terms of the MIT License.