setasign\SetaPDF2\Signer\X509

Crl Class representing a CRL.

File: /SetaPDF v2/Signer/X509/Crl.php
Old class name (alias): \SetaPDF_Signer_X509_Crl

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

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


Properties

$_crl

The ASN.1 element holding the CRL.

$_revokedCertificates

protected array Crl::$_revokedCertificates

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


Static Methods

fromFile()

public static Crl::fromFile (
string $path
): \SetaPDF_Signer_X509_Crl

Creates an instance from a file path.

Parameters
$path : string
 

Methods

__construct()

public Crl::__construct (
string $crl
)

The constructor.

Parameters
$crl : string

PEM or DER encoded string.

_getTBSCertList()

Get the tbsCertList value.

Exceptions

Throws \setasign\SetaPDF2\Signer\Exception

get()

public Crl::get (
string $format = 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 Crl::getDigest (
string $algo = 'sha1',
bool $raw = false
): string

Get the digest of the CRL.

Parameters
$algo : string
 
$raw : bool
 

getIssuerName()

public Crl::getIssuerName (
void
): string

Get the issuer name of the CRL.

Exceptions

Throws \setasign\SetaPDF2\Signer\Asn1\Exception

Throws \setasign\SetaPDF2\Signer\Exception

getNextUpdate()

public Crl::getNextUpdate (
void
): false|\DateTime

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

Exceptions

Throws \setasign\SetaPDF2\Signer\Exception

getRevokedCertificates()

public Crl::getRevokedCertificates (
void
): array

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 \setasign\SetaPDF2\Signer\Exception

getSignatureAlgorithm()

public Crl::getSignatureAlgorithm (
void
): array
Return Values

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

Exceptions

Throws \setasign\SetaPDF2\Signer\Exception

getSignatureValue()

public Crl::getSignatureValue (
bool $hex = true
): string
Parameters
$hex : bool
 
Exceptions

Throws \setasign\SetaPDF2\Signer\Exception

getSignedData()

public Crl::getSignedData (
void
): string
Exceptions

Throws \setasign\SetaPDF2\Signer\Exception

getThisUpdate()

public Crl::getThisUpdate (
void
): \DateTime

Get the issue date of the CRL.

Exceptions

Throws \setasign\SetaPDF2\Signer\Exception

isRevoked()

public Crl::isRevoked (): bool
Parameters
$certificate : \SetaPDF_Signer_X509_Certificate
 
Exceptions

Throws \setasign\SetaPDF2\Signer\Exception

verify()

Verify the signed object.

Parameters
$signerCertificate : \SetaPDF_Signer_X509_Certificate
 
Exceptions

Throws \setasign\SetaPDF2\Signer\Asn1\Exception

Throws \setasign\SetaPDF2\Signer\Exception