shinigami wrote:
Hi,
E want install a cert in a db. But my cert when i receive from outside is a
java.security.cert.X509Certificate, and the method importCertToPerm can“t do
it. I need to cast this cert to org.mozilla.jss.crypto.X509Certificate. Or
exist other way to do this??
Try these 2 methods:
call getEncoded on the java.security.cert.X509Certificate (method
inherited from java.security.cert.Certificate) to get the encoded DER of
the cert
http://java.sun.com/j2se/1.5.0/docs/api/java/security/cert/Certificate.html#getEncoded()
And then importCertPackage to create a
org.mozilla.jss.crypto.X509Certificate:
http://www.mozilla.org/projects/security/pki/jss/javadoc/org/mozilla/jss/CryptoManager.html#importCertPackage(byte[],%20java.lang.String)
Dave
_______________________________________________
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto