title: How can I trust a specific self-sign certificates? (Not trust all)
body: <p>How can I set my <code>HttpsURLConnection</code> to trust a specific certificate only? Currently my code is set to trust all certificates. But the requirement is to trust only a specific certificate and do not trust the others. How can I do it in Java? I'm using JDK 1.5.</p>