Beben wrote:
> I've have a similar problem, I'd like to convert a
> org.mozilla.jss.pkix.Certificate to a
> org.mozilla.jss.crypto.X509Certificate for retriving my privateKey
> using the method findPrivKeyByCert(X509Certificate) in
> org.mozilla.jss.CryptoManager...
> For converting a org.mozilla.jss.pkix.cert.Certificate to a
> java.security.cert.X509Certificate, I've personnaly success by
> encoding Certificate to an outputstream and decode it in java
> X509Certificate, but I don't success for mozilla X509Certificate :-(
Try CryptoManager.importCertPackage().
http://mozilla.org/projects/security/pki/jss/javadoc/org/mozilla/jss/CryptoManager.html#importCertPackage(byte[],%20java.lang.String)