mirror of
https://github.com/expo/expo-cli.git
synced 2026-11-15 13:28:10 -10:00
- @expo/[email protected] - @expo/[email protected] - @expo/[email protected] - @expo/[email protected] - @expo/[email protected] - [email protected] - [email protected] - @expo/[email protected] - [email protected] - @expo/[email protected] - @expo/[email protected] - @expo/[email protected] - @expo/[email protected] - @expo/[email protected] - @expo/[email protected] - @expo/[email protected] - [email protected] - @expo/[email protected] - [email protected] - @expo/[email protected] - [email protected] - @expo/[email protected] - [email protected]
👋 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