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

ssl-verifier

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ssl-verifier

Package that verifies SSL information from a URL.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

SSL-verifier

npm installnfo

Table of contents

About

ssl-verifier is a package that verifies SSL information from a URL.

Installation

Node.js v14.16.1 or newer is recommended.

Install: npm install ssl-verifier

Options

OptionDefaultDescription
methodGETCan be HEAD too
port443Your SSL/TLS entry point
agentdefaultDefault HTTPS agent with { maxCachedSessions: 0 }
rejectUnauthorizedfalseSkips authorization by default

Example usage

const SSL = require("ssl-verifier");

SSL.Info("https://github.com"/*, {port: 443, method: "GET"}*/).then(data => {
  
  console.log(data);
  
}).catch(error => {

  console.log(error);
  
});

Response Example

{
  subject: {
    commonName: "github.com",
    organization: "GitHub, Inc.",
    location: "San Francisco, California, US"
  },
  issuer: {
    commonName: "DigiCert High Assurance TLS Hybrid ECC SHA256 2020 CA1",
    organization: "DigiCert, Inc.",
    location: "US"
  },
  subjectAlternativeName: [ "github.com", "www.github.com" ],
  valid: true,
  validFrom: "Mar 25 00:00:00 2021 GMT",
  validTo: "Mar 30 23:59:59 2022 GMT",
  daysRemaining: 281,
  certificate: {
    OCSP: {
      url: [ "http://ocsp.digicert.com" ]
    },
    CA: {
      issuers: {
        url: [ "http://cacerts.digicert.com/DigiCertHighAssuranceTLSHybridECCSHA2562020CA1.crt" ]
      }
    }
  },
  bits: 256,
  modulus: undefined,
  exponent: undefined,
  publicKey: "<Buffer... 15 more bytes>",
  asn1Curve: "prime256v1",
  nistCurve: "P-256",
  fingerPrint: "84:63:B3:A9:29:12:CC:FD:1D:31:47:05:98:9B:EC:13:99:37:D0:D7",
  fingerPrint256: "0A:E3:84:BF:D4:DD:E9:D1:3E:50:C5:85:7C:05:A4:42:C9:3F:8E:01:44:5E:E4:B3:45:40:D2:2B:D1:E3:7F:1B",
  ExtendedKeyUsage: [ "1.3.6.1.5.5.7.3.1", "1.3.6.1.5.5.7.3.2" ],
  serialNumber: "0E8BF3770D92D196F0BB61F93C4166BE",
  raw: "<Buffer... 1240 more bytes>"
}

Expected Errors

If a problem occurs in the process, one of these errors might be triggered.

Invalid url - Invalid protocol - Invalid options - Invalid method - Invalid port - No certificate
ENOTFOUND - EPROTO - ERR_INVALID_URL - ERR_SOCKET_BAD_PORT - ERR_INVALID_ARG_TYPE

Help

If you are experiencing problems, or you just need a nudge in the right direction, please do not hesitate to create a New Issue on Github repository.

Keywords

FAQs

Package last updated on 27 Jun 2021

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