Supported SSL Certificates
PFX/PKCS #12 (
*.pfx/.p12/.pkcs12* ) certificates are supported from .NET Core 3.1, PEM-certificates are supported from .NET 5.0.
PKCS #12 file format is commonly used to bundle a private key with its X.509 certificate or to bundle all the members of a chain of trust.
For example, a certificate file may contain a public/private key with its single certificate while other members of a chain of trust may be specified in a single .pfx/.p12 or .pem file using the CaFile property settings field (if the full chain is needed).
Single PEM-file may contain both a certificate and a private key, also ones may be stored in two PEM files, in this case CertificateLocation property should point both files, for example "path_to_cert.pem|path_to_pk.pem".
To convert into PFX/PKCS #12 format from other format types, use the
openssl tool from the OpenSSL Toolkit.
For example, to convert from "Base64 Encoded (
*.pem )" to "Personal Information Exchange - PKCS #12 (
*.pfx )", invoke the following command on the PEM file(s):
openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt -certfile CACert.crt