Programmatically add a self-signed certificate to your keystore/truststore
问题 I saw this question (and others) where it is explained how to add a (self-signed) certificate to your keystore/cacerts manually by using the commandline. When doing this, you can set up a secured connection with a server without a signed certificate, if you were given the certificate (.cert file). This is can be useful for testing purposes. I would like to program this, so users don't need to do this manually. The basic concept would be the following: The user has a local copy of the .cert