Adding certificates to Java keystore

Java has its own certificate storage. At least in Arch Linux it is located in:

/etc/ssl/certs/java/

To add a new certificate there, run this command:

keytool -keystore cacerts -importcert -alias myrootcert -file /path/to/MyRootCert.crt

(you might want to run that as root) As a password, the default is “changeit”.

I encountered this while setting up my Android project in IntelliJ IDEA, trying to do a Gradle build. Also the Android SDK tool was failing on an invalid SSL connection.

(2733)

Tagged with: , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Unable to load the Are You a Human PlayThru™. Please contact the site owner to report the problem.