Report this

What is the reason for this report?

SSL Certificate - Keytool Exception

Posted on April 22, 2020
jouo

By jouo

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)



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

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)

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.