This demo shows you how to access the certificate and private key in a PFX/P12 file with the use of the openssl_pkcs12_read() function.