Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create certificate using keytool

Status
Not open for further replies.

VenkatRastapuram

Programmer
Oct 24, 2003
46
IN
Hello Sir,

I configured the tomcat server and for that I created a keystore using keytool.

Now I want to generate a certificate,so I created a local certificate (as certreq.csr). I imported a chain certificate from and added to my keystore.

Till here it is fine and in the final step while importing the certreq.csr it is giving sun.Security.pcks.ParsingException. The error is as follows.

Please tell me how to create a certificate using keytool

keytool -import -alias tomcat -keystore makeLogicKeyStore -trustcacerts -file d:\tomcat-jwsdp-1.4\certreq.csr

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)

Regards,
R.Venkatesh
Lead Developer
MakeLogic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top