Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ssl_certificate

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ssl_certificate

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

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'

# create object from certificate of pem or der format
cert_pem = File.read("spec/test_data/www.example.com.crt")
cert = SslCertificate::Certificate.new(cert_pem)

cert.common_name
# => "www.example.com"

cert.alternative_names
# => ["example.com", "hoge.example.com"]

key_pem = File.read("spec/test_data/www.example.com.key")
cert.check_private_key_str(key_pem)
# => true

# check whether a fqdn corresponds to the certificate
cert.check_fqdn("www.example.com")
# => true
cert.check_fqdn("hoge.example.com")
# => true

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.

FAQs

Package last updated on 08 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc