Primo It wrote:
Hi,
I`m trying to do it too.
I want to insert a certificate (a file *.cer selected in the machine) into
the Permanent Certificates DB by the CryptoManager.importCertToPerm(...),
but for it, i need to create an instance of
org.mozilla.jss.crypto.X509Certificate from this selected file.
is there a way to do it?
http://www.mozilla.org/projects/security/pki/jss/faq.html
*How do I convert org.mozilla.jss.crypto.X509Certificate to
org.mozilla.jss.pkix.cert.Certificate?*
import java.io.ByteArrayInputStream;
[...]
Certificate cert = (Certificate) ASN1Util.decode(
Certificate.getTemplate(),x509Cert.getEncoded() );
http://lxr.mozilla.org/mozilla/source/security/jss/org/mozilla/jss/tests
somehow like the CertificateFactory from the Sun
CertificateFactory cf = CertificateFactory.getInstance("X.509");
cert = (X509Certificate) cf.generateCertificate (new FileInputStream(new
File("c:/teste.cer")));
"shinigami" <[EMAIL PROTECTED]> escreveu na mensagem
news:[EMAIL PROTECTED]
http://lxr.mozilla.org/mozilla/source/security/jss/org/mozilla/jss/tests/VerifyCert.java
-glen
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??
_______________________________________________
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto
_______________________________________________
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto