How to get * .cer file to add self-signed HTTPS certificate as reliable for Java

I am connecting to the HTTPS website with a self-signed certificate using the Java applet. An applet cannot open an HTTPS connection - it returns the following exception:

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

So the problem is that I need to add the certificate as "trusted" for Java. I read that I should use the following command:

keytool -import -alias abc -file ABCCA.cer

Am I right? How to get a * .cer file? Debian 5 runs on the server. I use Windows 7 and Java 6 on the client machine.

+3
source share
2 answers

Connect to the https server with a browser and export the certificate.

firefox , " ", "" "..."

+3

1) Chrome .
2) "" " ".
3) HTTPS/SSL " ".
4) .
5) Windows ( Windows ) java.
6) ( Java) , Java
7) "" Java
8)
9) "" 10) () ( )
11) .

.

+2

Source: https://habr.com/ru/post/1736892/


All Articles