SetaPDF_Signer_X509_Crl Class representing a CRL.

File: /SetaPDF v2/Signer/X509/Crl.php

CertificateList ::= SEQUENCE { tbsCertList TBSCertList, signatureAlgorithm AlgorithmIdentifier, signatureValue BIT STRING }

TBSCertList ::= SEQUENCE { version Version OPTIONAL, -- if present, MUST be v2 signature AlgorithmIdentifier, issuer Name, thisUpdate Time, nextUpdate Time OPTIONAL, revokedCertificates SEQUENCE OF SEQUENCE { userCertificate CertificateSerialNumber, revocationDate Time, crlEntryExtensions Extensions OPTIONAL -- if present, version MUST be v2 } OPTIONAL, crlExtensions [0] EXPLICIT Extensions OPTIONAL -- if present, version MUST be v2 }

Class hierarchy

Summary

Static Properties

$usePhpseclibForRsaPss

Flag defining whether usage of phpseclib or default OpenSSL methods for RSA_PSS validation.

$verifyCallback

static public null|callable SetaPDF_Signer_Asn1_Signed::$verifyCallback

A callable that can be used to implement individual verification logic.


Properties

$_crl

The ASN.1 element holding the CRL.

$_revokedCertificates

Cache of revoked certificates. Indexed by serial numbers (hex encoded).


Static Methods

fromFile()

Creates an instance from a file path.

Parameters
$path : string
 

Methods

__construct()

public SetaPDF_Signer_X509_Crl::__construct (
string $crl
)

The constructor.

Parameters
$crl : string

PEM or DER encoded string.

_getTBSCertList()

Get the tbsCertList value.

Exceptions

Throws SetaPDF_Signer_Exception

get()

public SetaPDF_Signer_X509_Crl::get (
[ string $format = SetaPDF_Signer_X509_Format::PEM ]
): string

Get the CRL encoded as DER or PEM.

Parameters
$format : string
 

getAsn1()

Get the ASN.1 instance of the CRL.

getDigest()

public SetaPDF_Signer_X509_Crl::getDigest (
[ string $algo = 'sha1' [, bool $raw = false ]]
): string

Get the digest of the CRL.

Parameters
$algo : string
 
$raw : bool
 

getIssuerName()

public SetaPDF_Signer_X509_Crl::getIssuerName (
void
): string

Get the issuer name of the CRL.

Exceptions

Throws SetaPDF_Signer_Asn1_Exception

Throws SetaPDF_Signer_Exception

getNextUpdate()

Get the date by which the next CRL will be issued.

Exceptions

Throws SetaPDF_Signer_Exception

getRevokedCertificates()

Get all revoked certificates.

Return Values

The index is the hex encoded serial number of the certificate. The value is an array with detailed information (currently only "revocationDate").

Exceptions

Throws SetaPDF_Signer_Exception

getSignatureAlgorithm()

Return Values

The first value holds the OID of the algorithm. The second value is the ASN.1 structure of the parameters.

Exceptions

Throws SetaPDF_Signer_Exception

getSignatureValue()

public SetaPDF_Signer_X509_Crl::getSignatureValue (
[ bool $hex = true ]
): string

Parameters
$hex : bool
 
Exceptions

Throws SetaPDF_Signer_Exception

getSignedData()

public SetaPDF_Signer_X509_Crl::getSignedData (
void
): string

Exceptions

Throws SetaPDF_Signer_Exception

getThisUpdate()

Get the issue date of the CRL.

Exceptions

Throws SetaPDF_Signer_Exception

isRevoked()

verify()

Verify the signed object.

Parameters
$signerCertificate : SetaPDF_Signer_X509_Certificate
 
Exceptions

Throws SetaPDF_Signer_Asn1_Exception

Throws SetaPDF_Signer_Exception