@expo/pkcs12
PKCS#12 Utilities for Node.js
Last updated 24 days ago by brentvatne .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @expo/pkcs12 
SYNC missed versions from official npm registry.

PKCS#12

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

Current Tags

  • 0.0.4                                ...           latest (24 days ago)

4 Versions

  • 0.0.4                                ...           24 days ago
  • 0.0.3                                ...           a month ago
  • 0.0.2                                ...           a month ago
  • 0.0.1                                ...           a month ago

Copyright 2014 - 2016 © taobao.org |