1.0.5 • Published 4 years ago

checksslcertificate v1.0.5

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

npm version

checkSslCertificate

A module which allows you to check the certificate of a given hostname is valid.

  • Typescript support
  • Module import or usage via CLI

This module returns a Promise which will always resolve.

In case of an error the returned object will contain have an error property.

Installation

To install this package run:

$ npm install checkSslCertificate --save 
# Or
$ yarn add checkSslCertificate

For the usage via CLI it is recommended to install the package globally.

$ npm install -g checkSslCertificate
# Or
$ yarn global add checkSslCertificate

Usage

import checkSslCertificate from 'checkSslCertificate'
// or 
// const checkSslCertificate = require('checkSslCertificate').default

checkSslCertificate({hostname: 'github.com'}).then(res => {
   console.log(res)
})

or from command line

checksslcertificate -h example.com 

Options

UrlObject

PropertiesTypeRequiredDefaultExample
hostnamestringtrue-'example.com'
methodstringfalse'HEAD''GET'
pathstringfalse-'/foo'
portnumberfalse443444

Return Value

SslCheckResponse

PropertiesTypeOptionalExample
errorstringtrue
originalObjectUrlObjectfalse{hostname: 'example.com'}
validbooleanfalsetrue
validFromstringtrue'May 8 00:00:00 2018 GMT'
validUntilstringtrue'Jun 3 12:00:00 2020 GMT'
1.0.5

4 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago