I could not find a method to parse x509 pem files. I tried using ParseX509 of utils module which threw up.