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

@expo/pkcs12

Package Overview
Dependencies
Maintainers
27
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@expo/pkcs12

PKCS#12 Utilities for Node.js

  • 0.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
27
Created
Source

👋 Welcome to
@expo/pkcs12

PKCS#12 utility functions to extract certificates from conventional and keystore PKCS#12 files.

Examples

Extracting a certificate from a conventional PKCS#12 file

const p12 = parsePKCS12(base64EncodedP12, password); // deserializes encodedP12
const certificate = getX509Certificate(p12); // extracts single certificate from p12
const sha1Fingerprint = getCertificateFingerprint(certificate, {
  hashAlgorithm: 'sha1',
}); // Hash like 02ec75a7181c575757baa931fe3105b7125ff10a

Extracting a certificate from a keystore in a PKCS#12 file

const p12 = parsePKCS12(base64EncodedP12, password); // deserializes encodedP12
const certificate = getX509CertificateByFriendlyName(p12, alias); // extracts single certificate stored under alias in p12
const sha1Fingerprint = getCertificateFingerprint(certificate, {
  hashAlgorithm: 'sha1',
}); // Hash like 02ec75a7181c575757baa931fe3105b7125ff10a

Keywords

FAQs

Package last updated on 22 Oct 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