how to get certificate from a https site

When integration with third party using HttpsURLConnection in java you usually get following issue if your third party use self signed certificate: PKIX path building unable to find valid certification path to requested target

This issue happen cause java cannot verify that certificate and you must import it manual to trust store so java can trust site. But how you can get that certificate? In this post i will guide you how to get certificate from a https site.

Access https site using firefox. You see lock icon on address bar, Click on that icon

Click on More information… to bring site information diaglog


Click on View Certificate to show detail about certificate of this site and choose tab Details

Click Export… to export that certificate to file.

Leave a Reply