phpdftk API Documentation

CrlClient
in package

FinalYes

CRL (Certificate Revocation List) fetcher.

Extracts CRL Distribution Point URLs from a certificate's CDP extension and fetches the CRL via HTTP GET. Returns raw DER-encoded CRL bytes suitable for embedding in a DSS.

Table of Contents

Methods

__construct()  : mixed
fetchCrl()  : string
Fetch a CRL from the given URL via HTTP GET.
getCrl()  : string
Fetch the CRL for a certificate from its CRL Distribution Points.

Methods

__construct()

public __construct([int $timeout = 30 ]) : mixed
Parameters
$timeout : int = 30

HTTP request timeout in seconds

fetchCrl()

Fetch a CRL from the given URL via HTTP GET.

public fetchCrl(string $url) : string

Automatically detects PEM vs DER format and converts PEM to DER.

Parameters
$url : string

HTTP/HTTPS URL to the CRL

Tags
throws
RuntimeException

on network error or invalid response

Return values
string

Raw DER-encoded CRL

getCrl()

Fetch the CRL for a certificate from its CRL Distribution Points.

public getCrl(string $derCert) : string

Tries each CDP URL in order until one succeeds.

Parameters
$derCert : string

DER-encoded certificate

Tags
throws
RuntimeException

if no CDP is present or all URLs fail

Return values
string

Raw DER-encoded CRL


        
On this page

Search results