Convert PFX Certificate to JKS, P12, CRT

I recently had to use a PFX certificate for client authentication, and for that reason, I had to convert it to a Java keystore (JKS). In this post, we will learn how to create both a truststore and a keystore, because based on your needs, you might need one or the other. 

The difference between truststore and keystore, if you are not aware is, according to the JSSE ref guide: