Hi Dennis!

Thank you for the answer...

I still have a question... In the following code, when I comment the
first line, I can't see the public info of the certificates without
specifying a password. But when I remove the comment of it, it works.

cm.getPermCerts(); // THIS line

Enumeration<CryptoToken> ect = null;
ect = (Enumeration<CryptoToken>) cm.getAllTokens();

CryptoToken ct = null;
//ct = cm.getTokenByName("ePass Token");
//ct = cm.getExternalTokens();

while (ect.hasMoreElements()) {
    ct = ect.nextElement();
    System.out.println("CryptoToken.name= " + ct.getName());
    System.out.println("getCertificates().before");
    X509Certificate x509col[] = ct.getCryptoStore().getCertificates();
    System.out.println("getCertificates().after");
    for (X509Certificate cert : x509col) {
        System.out.println("sdn=" + cert.getSubjectDN().toString());
    }
}


Why does it happens?

Thanks!

_______________________________________________
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to