Using the importCertPackage method i got this exception
org.mozilla.jss.crypto.NoSuchItemOnTokenException

at org.mozilla.jss.CryptoManager.importCertPackageNative(Native Method)

at org.mozilla.jss.CryptoManager.importCertPackage(CryptoManager.java:962)

for i accept The Builtin Object Token  i need a passoword ?

"David Stutzman" <dstutzman*at*dsci-usa.com> escreveu na mensagem 
news:[EMAIL PROTECTED]
> 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

Reply via email to