setasign\SetaPDF2\Signer\X509

Chain Helper class to build certificate paths.

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

Class hierarchy

Summary

Properties

$_extraCertificates

The extra certificates.

$_logger

$_trustedCertificates

The trusted certificates.


Methods

__construct()

public Chain::__construct (
null|string|Certificate|Certificate[]|CollectionInterface $trustedCertificates = null
)

The constructor.

Parameters
$trustedCertificates : null|string|Certificate|Certificate[]|CollectionInterface

$trustedCertificates

Exceptions

Throws \setasign\SetaPDF2\Signer\Asn1\Exception

_buildPaths()

protected Chain::_buildPaths (
Certificate $certificate,
string[] &$paths,
Certificate[] $currentPath = array ( )
): void

Build all possible paths.

Parameters
$certificate : Certificate
 
$paths : string[]
 
$currentPath : Certificate[]
 
Exceptions

Throws \setasign\SetaPDF2\Signer\Asn1\Exception

Throws \setasign\SetaPDF2\Signer\Exception

_findIssuer()

buildPath()

public Chain::buildPath (
\SetaPDF_Signer_X509_Certificate $certificate,
?\DateTimeInterface $dateTime = null,
?\DateTimeZone $timeZone = null
): false|\SetaPDF_Signer_X509_Certificate[]

Build a valid certificate path.

Parameters
$certificate : \SetaPDF_Signer_X509_Certificate
 
$dateTime : ?\DateTimeInterface

If a date time is given only certificates which are valid at this will be part of the path.

$timeZone : ?\DateTimeZone
 
Exceptions

Throws \setasign\SetaPDF2\Signer\Asn1\Exception

Throws \Exception

getExtraCertificates()

Get the extra certificates collection instance.

Exceptions

Throws \setasign\SetaPDF2\Signer\Asn1\Exception

getLogger()

Get the logger instance.

If no logger instance was passed before a new instance of \setasign\SetaPDF2\Signer\ValidationRelatedInfo\Logger is returned.

getTrustedCertificates()

Get the trusted certificates collection instance.

Exceptions

Throws \setasign\SetaPDF2\Signer\Asn1\Exception

setLogger()