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

ssl_expiry

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ssl_expiry

  • 1.0.4
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

DevelopersToolbox logo
Github Build Status License Created
Release Released Commits since release

Overview

This is a simple little gem for checking when an SSL will expire.

Installation

Add this line to your application's Gemfile:

gem 'ssl_expiry'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ssl_expiry

Usage

Simple Usage

require 'ssl_expiry'

SSLExpiry::SSLExpiry.check_certificates('wolfsoftware.com')

Results:
{"wolfsoftware.com"=>{"status"=>200, "expires_on"=>"02 Aug 2024", "expires_in"=>57, "common_name"=>"wolfsoftware.com", "issuer"=>"Let's Encrypt"}}
Multiple Domains

It is possible to check a list of domains rather than just single domains, this is done by passing a list[] to SSLExpiry::SSLExpiry.check_certificates.

require 'ssl_expiry'

SSLExpiry::SSLExpiry.check_certificates(['wolfsoftware.com', 'wolfsoftware.net'])

Displaying the output

require 'ssl_expiry'

results = SSLExpiry::SSLExpiry.check_certificates('wolfsoftware.com')
SSLExpiry::SSLExpiry.display_results(results)

This would give the following output

----------------------------------------------------------------------------------------------------
 Domain                         | Status
----------------------------------------------------------------------------------------------------
 wolfsoftware.com               | expires on 02 Aug 2024 (in 57 days) [CN=wolfsoftware.com]
----------------------------------------------------------------------------------------------------

Command Line Tools

There is a command line tool included with this gem.

check-ssl -d wolfsoftware.com

----------------------------------------------------------------------------------------------------
 Domain                         | Status
----------------------------------------------------------------------------------------------------
 wolfsoftware.com               | expires on 02 Aug 2024 (in 57 days) [CN=wolfsoftware.com]
----------------------------------------------------------------------------------------------------

Multiple Domains

To check multiple domains at the same time, simply supply a comma separated list.

check-ssl -d wolfsoftware.com,wolfsoftware.net

------------------------------------------------------------------------------------------------------------------------
 Domain                         | Status
------------------------------------------------------------------------------------------------------------------------
 wolfsoftware.com               | expires on 02 Aug 2024 (in 57 days) [CN=wolfsoftware.com]
 wolfsoftware.net               | expires on 02 Aug 2024 (in 57 days) [CN=wolfsoftware.net]
------------------------------------------------------------------------------------------------------------------------

Custom port

If you want to check an SSL expiry on a custom port you can do this by adding the port to the end of the domain.

  check-ssl -d wolfsoftware.com:8080

FAQs

Package last updated on 06 Jun 2024

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