How-to articles, tricks, and solutions about CERTIFICATE

How to import a .cer certificate into a java keystore?

To import a .cer certificate into a Java keystore, you can use the keytool utility that comes with the Java Development Kit (JDK). The keytool utility is a command-line tool that allows you to manage certificates and keystores.

Trusting all certificates using HttpClient over HTTPS

To trust all certificates when using the Apache HttpClient library to make HTTPS requests, you can create a custom X509TrustManager implementation that trusts all certificates and use it to create an SSLContext with a custom TrustStrategy.