Error Importing Certificate file Using Keytool
843811Jun 18 2007 — edited Aug 31 2007Hello Folks
I am trying to import a certificate file provided by our Ldap Admin,
I get the following error
Please let me know if you have an idea why am i getting it.
Does the size of the Key file matter ?? it s around 4kb
C:\j2sdk1.4.2_08\jre\lib\security>keytool -import -alias ldapsecurity -trustcace
rts -file SOTROOT.cer -storepass changeit -noprompt -keystore ldapstore
sun.security.pkcs.ParsingException: X509.ObjectIdentifier() -- data isn't an obj
ect 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.ja
va:530)
at sun.security.provider.X509Factory.engineGenerateCertificates(X509Fact
ory.java:407)
at java.security.cert.CertificateFactory.generateCertificates(Certificat
eFactory.java:511)
at sun.security.tools.KeyTool.installReply(KeyTool.java:1193)
at sun.security.tools.KeyTool.doCommands(KeyTool.java:504)
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.security.cert.CertificateException: X509.ObjectIdentifier()
-- data isn't an object ID (tag = 48)
Thanks
Surendra