PHP code example of konomae / pkcs7-php
1. Go to this page and download the library: Download konomae/pkcs7-php library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
konomae / pkcs7-php example snippets
use Konomae\PKCS7\Degenerate;
// DER encoded X.509 certificate
$x509 = file_get_contents('/path/to/x509certificate.der');
$p7 = new Degenerate($x509);
// Same result of the command:
// openssl crl2pkcs7 -nocrl -certfile client.crt -outform PEM -out client.p7b.pem
$p7->toPEM();
bash
composer