Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error Importing SSL certificate : Not an X.509 Certificate

I am trying to Update the SSL certificate in accordance with this post .

I am noob in certificates, so i followed this guide. But, when i enter

keytool -keystore mycacerts -storepass changeit -importcert -file "C:\Users\Noks\Desktop\cacerts.pem" -v 

I get the error:

keytool error: java.lang.Exception: Input not an X.509 certificate java.lang.Exception: Input not an X.509 certificate         at sun.security.tools.KeyTool.addTrustedCert(KeyTool.java:1913)         at sun.security.tools.KeyTool.doCommands(KeyTool.java:818)         at sun.security.tools.KeyTool.run(KeyTool.java:172)         at sun.security.tools.KeyTool.main(KeyTool.java:166) 

How do i fix this?

like image 519
nikel Avatar asked Mar 27 '12 12:03

nikel


People also ask

Is x 509 certificate the same as SSL certificate?

SSL/TLS X. 509 certificates are digital files that are used for Secure Sockets Layer (SSL) or Transport Layer Security (TLS). An SSL/TLS certificate is one of the most popular types of X. 509 certificates or a type of public-key certificate which uses the X.

What is x509 certificate error?

Description of the problemThe docker daemon does not trust the self-signed certificate, which is causing the x509 error. This may occur due to the expiration of the current certificate, due to a changed hostname, and other changes.


1 Answers

Does your cacerts.pem file hold a single certificate? Since it is a PEM, have a look at it (with a text editor), it should start with

-----BEGIN CERTIFICATE-----

and end with

-----END CERTIFICATE-----

Finally, to check it is not corrupted, get hold of openssl and print its details using

openssl x509 -in cacerts.pem -text

like image 96
Bruno Grieder Avatar answered Sep 27 '22 23:09

Bruno Grieder