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

ocsp-hashes

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ocsp-hashes

Creates ocsp hashes from pem certificate and pem issuer certificate for ocsp revocation validation

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

OCSP-hashes generator: Node.js

Creates ocsp hashes for certificate revocation check from pem encoded certificates.

##Publications:

https://blog.appit-online.de/publications/

Table of contents:

Quickstart

Installing the library

npm install ocsp-hashes --save

Using the library

import * as ocspHashes from 'ocsp-hashes';

/**
 * Given a pem certificate file and issuer cert file.
 * @param {string} certPath The path to a certificate file.
 * @param {string} issuerCertPath The path to a issuer certificate file.
 * @param {string} hashingAlgorithm - default sha256.
 * @param {boolean} disableFilePathValidations - default false - only for development or if you know what you are doing.
 */
const ocspHashes = await ocspHashes.getOCSPHashes(certPath, issuerCertPath, hashingAlgorithm, disableFilePathValidations);
console.log('The ocsp object:');
console.log(ocspHashes);

const ocspHashes = await ocspHashes.getOCSPHashes(certPath, issuerCertPath, hashingAlgorithm);
console.log('The ocsp object:');
console.log(ocspHashes);

const ocspHashes = await ocspHashes.getOCSPHashes(certPath, issuerCertPath);
console.log('The ocsp object:');
console.log(ocspHashes);


/*
{
        "hashAlgorithm": "sha256",
        "issuerNameHash": "C3898FF2BAFB7FD5F83CE0A25AC731A8D78898874FF17EA3EC01FAEF11F1E7B8",
        "issuerKeyHash": "7B6C1816B110889887019E8AF43267675B95D9EAC75A4476A0C259EB090EF705",
        "serialNumber": "256E8AF6A2AD1F14E69843888F5D78C1"
}
*/

Supported Node.js Versions

Our client libraries follow the Node.js release schedule. Libraries are compatible with all current active and maintenance versions of Node.js.

License

Apache Version 2.0

See LICENSE

Keywords

FAQs

Package last updated on 12 Dec 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