added support for .p12 and .pem files