React Native
React Native
Load CMS PKCS#7 Certificate (.p7b)
See more Certificates Examples
Loads a digital certificate from a Cryptographic Message Syntax Standard PKCS7 (.p7b) file and fetches information about the cert.Chilkat React Native Downloads
import { Cert } from '@chilkat/react-native'
function chilkatExample() {
const cert = new Cert();
// LoadFromFile will load virtually any certificate format file.
// It will auto-recognize the format and load appropiately.
try {
cert.loadFromFile('/Users/chilkat/testData/cer/chilkat.p7b');
} catch {
console.log(cert.lastErrorText);
return;
}
// DN = "Distinguished Name"
console.log(`SubjectDN:${cert.subjectDN}`);
console.log(`Common Name:${cert.subjectCN}`);
console.log(`Issuer Common Name:${cert.issuerCN}`);
console.log(`Serial Number:${cert.serialNumber}`);
}