Question

SSL Certificate - Keytool Exception

Posted April 22, 2020 445 views
System Tools

I’m following this guide:
https://www.thesslstore.com/knowledgebase/ssl-install/tomcat-ssl-installation/

Got the .p7b file from name.com, moved it into my droplet, then ran:

keytool -import -trustcacerts -alias server -file placeholder.p7b -keystore placeholder.jks

But it’s throwing:

keytool error: java.lang.Exception: Input not an X.509 certificate

I followed by running:

openssl x509 -in placeholder.p7b -text

And got:

unable to load certificate
140089256595904:error:0909006C:PEM routines:get_name:no start line:../crypto/pem/pem_lib.c:745:Expecting: TRUSTED CERTIFICATE

Does that mean my certificate is corrupted somehow? (I didn’t even touch it, just downloaded it)

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Adding to this, I have the following download options, but the guide said to pick .p7b

  1. Individual .crts (zipped)
  2. A P7B bundle of all the certs in a .p7b file
  3. A P7B bundle of all the certs with a .cer extension
  4. Separate primary and intermediate .crt files (zipped)
  5. A single .pem file containing all the certs
  6. A single .pem file containing only the end entity certificate
  7. A single .pem file containing all the certs except for the root
  8. Individual .crt files with a .cer extension (zipped)
  9. Individual .crt files with a .pem extension (zipped)
Submit an Answer