Tuesday, 30 October 2018

Converting PFX Certs to Certificate and Key Files using OpenSSL



Recently, I have an ask where we want to automate Web Service Health Check manual steps. I have choose Python to do that (Cause one only my fav language :-) but faced a very initial hiccup as PFX certs. As our web services are SSL enabled which need Public/Private Key (Or Certificate) to authenticate the Consumer and Python supports certificates and keys only in PEM format.

So let's learn how we can convert PFX (Personal Information Exchange) certs to PEM (Privacy Enhanced Mail) certificate.



  • Extract certificate.pem or certificate.cer from certificate.pfx:
  • -


  • Extract Key - 
This is 2 step process as below, first command extract the encrypted key and then second command use to decrypt the key to simple text.
-


Now, we can use these keys in our Python Health Check code, we will discuss that later.
Till then, Keep Loving this Blog .......... Happy Learning...........



Like the below page to get update  
Facebook Page      Facebook Group      Twitter Feed      Google+ Feed      Telegram Group