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

get-ssl-certificate

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-ssl-certificate - npm Package Compare versions

Comparing version 2.2.1 to 2.3.0

10

index.js

@@ -28,3 +28,3 @@ var https = require('https');

function getOptions(url) {
function getOptions(url, port, protocol) {
return {

@@ -34,3 +34,5 @@ hostname: url,

rejectUnauthorized: false,
ciphers: 'ALL'
ciphers: 'ALL',
port,
protocol
};

@@ -60,6 +62,6 @@ }

function get(url, timeout) {
function get(url, timeout, port = 443, protocol = 'https:') {
validateUrl(url);
var options = getOptions(url);
var options = getOptions(url, port, protocol);

@@ -66,0 +68,0 @@ return new Promise(function(resolve, reject) {

2

package.json
{
"name": "get-ssl-certificate",
"version": "2.2.1",
"version": "2.3.0",
"description": "A micro-library that returns a website's SSL certificate",

@@ -5,0 +5,0 @@ "main": "index.js",

# get-ssl-certificate
## A micro-library that returns a website's SSL certificate
## A zero-dependency utility that returns a website's SSL certificate

@@ -8,3 +8,3 @@ [![Build Status](https://travis-ci.org/johncrisostomo/get-ssl-certificate.svg?branch=master)](https://travis-ci.org/johncrisostomo/get-ssl-certificate)

[![Code Climate](https://codeclimate.com/github/johncrisostomo/get-ssl-certificate/badges/gpa.svg)](https://codeclimate.com/github/johncrisostomo/get-ssl-certificate)
[![npm](https://img.shields.io/badge/npm-v2.2.1-blue.svg)](https://www.npmjs.com/package/get-ssl-certificate)
[![npm](https://img.shields.io/badge/npm-v2.3.0-blue.svg)](https://www.npmjs.com/package/get-ssl-certificate)

@@ -53,6 +53,6 @@ ### Installation

#### Optional: Pass timeout (in ms)
#### Optional parameters: Timeout (in ms), Protocol (Default is 'https:') and Port (Default is 443)
```
sslCertificate.get('nodejs.org', 250).then(function (certificate) {
sslCertificate.get('nodejs.org', 250, 443, 'https:').then(function (certificate) {
console.log(certificate)

@@ -59,0 +59,0 @@ // certificate is a JavaScript object

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