sun.security.pkcs.ParsingException: Sequence tag error

  • Follow


Greetings,

I've start some SSL coding but I've still trouble with keytool.
At first a generated an SSL-Key:

keytool -genkey -keystore keys.dat
After that a generated a certreq 
keytool -certreq -keystore keys.dat > out.cert without any trouble.
Then A signed it with a previously generated OpenSSL-CA (using OpenSSL's
CA.pl toolbox) without any problem.
But reimporting the key causes some trouble:

jan@gustav:~/java/server$ keytool -import -file /mnt/jan/ca/newcert.pem
-keystore keys.dat
Enter keystore password:��secret
sun.security.pkcs.ParsingException: Sequence tag error
��������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.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: Sequence tag error
��������at
sun.security.util.DerInputStream.getSequence(DerInputStream.java:266)
��������at�sun.security.pkcs.ContentInfo.<init>(ContentInfo.java:115)
��������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: Sequence tag error

What's wrong here?

Keep smiling
yanosz
0
Reply Jan 8/12/2004 12:24:26 PM


0 Replies
705 Views

(page loaded in 0.027 seconds)

Similiar Articles:





7/22/2012 11:27:19 AM


Reply: