note 85475 deleted from function.openssl-pkcs12-read by cmb

From: Date: Sun, 19 Dec 2021 21:54:32 +0000
Subject: note 85475 deleted from function.openssl-pkcs12-read by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-217393@lists.php.net to get a copy of this message
Note Submitter: bromatom at directbox dot com ---- To extract the contents of a PKCS12 file you can use file_get_contents as well: <? $certs = array(); $pkcs12 = file_get_contents( "pkcs12file.pem" ); // No password openssl_pkcs12_read( $pkcs12, $certs, "" ); print_r( $certs ); ?> Output is: Array ( [cert] => --- BEGIN CERTIFICATE --- //snipsnip// --- END CERTIFICATE --- [pkey] => --- BEGIN RSA PRIVATE KEY --- //snipsnip// [extracerts] = Array ( ) )

« previous php.notes (#217393) next »