konomae / pkcs7-php
Degenerate PKCS7 certificate only form.
Installs: 5 126
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
pkg:composer/konomae/pkcs7-php
Requires
- php: >=7.0
- sop/asn1: ^3.2.0
Requires (Dev)
- phpunit/phpunit: ^6.5
This package is auto-updated.
Last update: 2025-10-15 15:11:01 UTC
README
Degenerate PKCS7 certificate only form.
Installation
composer require konomae/pkcs7-php
Example
<?php
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();