React Native Requires Chilkat v10.1.2+
React Native
List Certificates in the Current User Certificate Store (Windows Only)
See more Certificates Examples
This is a Windows-only example to list the certificates in the current-user certificate store (located in the Windows Registry).Chilkat React Native Downloads
import { Cert, CertStore } from '@chilkat/react-native'
function chilkatExample() {
// This is a Windows-only example because it lists the certificates
// stored in the Windows Current User Certificate Store located in the
// Windows Registry.
const certStore = new CertStore();
const readOnly = true;
try {
certStore.openCurrentUserStore(readOnly);
} catch {
console.log(certStore.lastErrorText);
return;
}
const cert = new Cert();
const numCerts = certStore.numCertificates;
let i = 0;
while (i < numCerts) {
certStore.getCert(i, cert);
console.log(`DN = ${cert.subjectDN}`);
console.log(`Email = ${cert.subjectE}`);
i++;
}
}