SetaPDF_Signer_X509_Chain Helper class to build certificate paths.

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

Class hierarchy

Summary

Properties

$_extraCertificates

The extra certificates.

$_logger

protected LoggerInterface SetaPDF_Signer_X509_Chain::$_logger

The logger instance.

$_trustedCertificates

The trusted certificates.


Methods

__construct()

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

The constructor.

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

$trustedCertificates

Exceptions

Throws SetaPDF_Signer_Asn1_Exception

_buildPaths()

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

Build all possible paths.

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

Throws SetaPDF_Signer_Asn1_Exception

Throws SetaPDF_Signer_Exception

_findIssuer()

protected SetaPDF_Signer_X509_Chain::_findIssuer (
Certificate $certificate
): Collection

Find issuers by a certificate.

Parameters
$certificate : Certificate
 
Exceptions

Throws SetaPDF_Signer_Asn1_Exception

Throws SetaPDF_Signer_Exception

buildPath()

public SetaPDF_Signer_X509_Chain::buildPath (
Certificate $certificate [, DateTimeInterface|null $dateTime = null [, DateTimeZone|null $timeZone = null ]]
): false|Certificate[]

Build a valid certificate path.

Parameters
$certificate : Certificate
 
$dateTime : DateTimeInterface|null

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

$timeZone : DateTimeZone|null
 
Exceptions

Throws SetaPDF_Signer_Asn1_Exception

Throws Exception

buildPaths()

public SetaPDF_Signer_X509_Chain::buildPaths (
Certificate $certificate
): Certificate[]

Build all possible paths.

Parameters
$certificate : Certificate
 
Exceptions

Throws SetaPDF_Signer_Asn1_Exception

Throws SetaPDF_Signer_Exception

getExtraCertificates()

public SetaPDF_Signer_X509_Chain::getExtraCertificates (
void
): Collection

Get the extra certificates collection instance.

Exceptions

Throws SetaPDF_Signer_Asn1_Exception

getLogger()

public SetaPDF_Signer_X509_Chain::getLogger (
void
): LoggerInterface

Get the logger instance.

If no logger instance was passed before a new instance of SetaPDF_Signer_ValidationRelatedInfo_Logger is returned.

getTrustedCertificates()

Get the trusted certificates collection instance.

Exceptions

Throws SetaPDF_Signer_Asn1_Exception

setLogger()

public SetaPDF_Signer_X509_Chain::setLogger (
LoggerInterface $logger
): void

Set a logger instance.

Parameters
$logger : LoggerInterface