Apache HttpClient is a popular library that many other frameworks build upon. Naming one for all – you can find it in Spring Framework RestTemplate. It’s quite suprising that its not easy to find compherensible walkthroughs how to make it trust server certificates that are not validable by certificate chains baked in standard Java installation. Spending a few hours searching and tweaking the code I’ve decided to document easy – step by step solution how to do this for emerging Let’s Encrypt certificate authority (but it’s applicable to any other CA too).
Do you want to save several hours of yours? Read on 🙂