unable to import requested certificate
hi all,
i want to sign my jar file so that i can use it using the JNLP file. For this i have to sign my jar file. For this i followed the instructions provided in sun's site. i requested for a certificate using the command keytool -certreq. with this i received a certificate with some gibberish which i stored in a file named "xyz". After that i tried to import it using the command keytool -import -alias abc -file xyz. This asks me for my password for keystore and then gives an error which is below :
keytool error: java.lang.Exception: Input not an X.509 certificate
also when i tried to get the fingerprint of the certificate i received an error saying :
sun.security.pkcs.ParsingException: X509.ObjectIdentifier() -- data isn't an object ID (tag = 48)
at sun.security.pkcs.PKCS7.parse(PKCS7.java:118)
at sun.security.pkcs.PKCS7.<init>(PKCS7.java:68)
at sun.security.provider.X509Factory.parseX509orPKCS7Cert(X509Factory.java:530)
at sun.security.provider.X509Factory.engineGenerateCertificates(X509Factory.java:407)
at java.security.cert.CertificateFactory.generateCertificates(CertificateFactory.java:511)
at sun.security.tools.KeyTool.doPrintCert(KeyTool.java:1021)
at sun.security.tools.KeyTool.doCommands(KeyTool.java:539)
at sun.security.tools.KeyTool.run(KeyTool.java:124)
at sun.security.tools.KeyTool.main(KeyTool.java:118)
Caused by: java.io.IOException: X509.ObjectIdentifier() -- data isn't an object ID (tag = 48)
at sun.security.util.ObjectIdentifier.<init>(ObjectIdentifier.java:134)
at sun.security.util.DerInputStream.getOID(DerInputStream.java:250)
at sun.security.pkcs.ContentInfo.<init>(ContentInfo.java:120)
at sun.security.pkcs.PKCS7.parse(PKCS7.java:136)
at sun.security.pkcs.PKCS7.parse(PKCS7.java:115)
... 8 more
keytool error: java.lang.Exception: Failed to parse input
now i don't know what else to do as sun's site does not mention of any such errors. I will be glad if you can help me through this problem.
thanks.
|