# HG changeset patch # User Oleksandr Gavenko # Date 1417688577 -7200 # Node ID 1cabdf6fe2964985dd16b7f04c1f29efc5ec1384 # Parent b911a74c6e5247c92a96c521d45af71be60cf806 Import SSL certificate. diff -r b911a74c6e52 -r 1cabdf6fe296 java.rst --- a/java.rst Sat Nov 29 18:52:05 2014 +0200 +++ b/java.rst Thu Dec 04 12:22:57 2014 +0200 @@ -201,6 +201,32 @@ http://mvnrepository.com/search.html?query=PKG http://www.jarfinder.com +Import SSL certificate. +======================= + +Get cert with:: + + $ openssl s_client -connect promin-test.it.loc:433 + + -----BEGIN CERTIFICATE----- + ... + -----END CERTIFICATE----- + +or by opening URL in broswer and exporting in "Page info" ==> "Security" menu. + +Call import utility with default ``changeit`` password:: + + $ keytool -importcert -file $YOUR.crt -keystore $JAVA_HOME/jre/lib/security/cacert -alias $ANY -storepass changeit + $ keytool -list -v -keystore $JAVA_HOME/jre/lib/security/cacert -storepass changeit + +Import certificate system wide in Debian by (note, ``.crt`` extention is +mandatory):: + + $ sudo mkdir /usr/share/ca-certificates/$ANY/ # don't mess with other certs + $ sudo cp /tmp/$YOUR.crt /usr/share/ca-certificates/$ANY/ + $ sudo dpkg-reconfigure --force ca-certificates # check your cert in curses GUI! + $ sudo update-ca-certificates --fresh --verbose + Java EE versions. =================