Reputation: 3
Trying to install an SSL certificate for a web application that runs on Tomcat.
when I run this command I get the error below:
D:\jdk1.6.0_30\bin>keytool -import -alias root -keystore tomcat2.keystore -trust cacerts -file D:/SSL/gdroot-g2.crt Enter keystore password:
keytool error: java.security.cert.CertificateException: Unable to initialize, ja va.io.IOException: DerInputStream.getLength(): lengthTag=94, too big.
Upvotes: 0
Views: 2135
Reputation: 12075
the certificate is expected by default having DER format
you can import the pem/crt file with parameter -rfc
keytool -import -alias root -keystore tomcat2.keystore -trustcacerts -rfc -file D:/SSL/gdroot-g2.crt
Upvotes: 1