Hi,
when i "convert" the PK11InternalTokenCert to a java X509Certificate and then i
print out the certificate the public key is in this certificate as a:
org.mozilla.jss.pkcs11.PK11RSAPublicKey@17050dc, but i want it thee i clear
text and "normal". How can i do this an my conversation?
i did it this way:
CryptoManager.initialize(profileFolder);
CryptoManager cm = CryptoManager.getInstance();
X509Certificate[] certs = cm.getPermCerts();
PK11InternalTokenCert cert = (PK11InternalTokenCert) certs[0];
CertificateFactory certFactory = CertificateFactory.getInstance("X.509");
java.security.cert.X509Certificate certificate =
((java.security.cert.X509Certificate) certFactory.generateCertificate(new
ByteArrayInputStream(certs[0].getEncoded())));
System.out.println(certificate);
--
dev-tech-crypto mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-crypto