2017 © Pedro Peláez
 

library openssl_x509_gencrl

Missing OpenSSL function on PHP to create CRL (certificate revocation list) for CA

image

ukrbublik/openssl_x509_gencrl

Missing OpenSSL function on PHP to create CRL (certificate revocation list) for CA

  • Thursday, April 26, 2018
  • by ukrbublik
  • Repository
  • 1 Watchers
  • 6 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

openssl_x509_crl()

Description:

If you want to create own Certification authority (CA) on pure PHP with OpenSSL extension, you need a function to create certificate revocation list (CRL) which is missing in OpenSSL extension (request #40046)., (*1)

This lib implements such function - openssl_x509_crl(), (*2)

Usage example:

use Ukrbublik\openssl_x509_crl\X509;
use Ukrbublik\openssl_x509_crl\X509_CERT;
use Ukrbublik\openssl_x509_crl\X509_CRL;

$ci = array(
    'no' => 1,
    'version' => 2,
    'days' => 30,
    'alg' => OPENSSL_ALGO_SHA1,
    'revoked' => array(
        array(
            'serial' => '101',
            'rev_date' => time(),
            'reason' => X509::getRevokeReasonCodeByName("cessationOfOperation"),
            'compr_date' => strtotime("-1 day"),
            'hold_instr' => null,
        )
    )
);
$ca_pkey = openssl_pkey_get_private(file_get_contents('ca_key.key'));
$ca_cert = X509::pem2der(file_get_contents('ca_cert.cer'));
$crl_data = openssl_x509_crl($ci, $ca_pkey, $ca_cert);
//$crl_data contains CRL in DER format

The Versions

26/04 2018

dev-master

9999999-dev https://github.com/ukrbublik/openssl_x509_crl

Missing OpenSSL function on PHP to create CRL (certificate revocation list) for CA

  Sources   Download

MIT GPL

The Requires

  • ext-openssl *
  • php >=5.3.0
  • ext-bcmath *

 

by Avatar ukrbublik

php cryptography x509 x.509 asn1 asn.1 openssl certificate certificates openssl-extension certificate-authority certificate-revocation-lists

22/05 2017

1.2

1.2.0.0 https://github.com/ukrbublik/openssl_x509_crl

Missing OpenSSL function on PHP to create CRL (certificate revocation list) for CA

  Sources   Download

GPL

The Requires

  • php >=5.3.0
  • ext-openssl *
  • ext-bcmath *

 

by Avatar ukrbublik

php cryptography x509 x.509 asn1 asn.1 openssl certificate certificates openssl-extension certificate-authority certificate-revocation-lists