Added functions to convert x509 certificates from PEM format to PKCS#7 and PKCS#12