SetaPDF_Signer_ValidationRelatedInfo_Collector Class offering methods to collect validation related information.

File: /SetaPDF v2/Signer/ValidationRelatedInfo/Collector.php

Class hierarchy

Summary

Constants

SOURCE_CRL

Source constant.

SOURCE_OCSP

Source constant.

SOURCE_OCSP_AND_CRL

SOURCE_OCSP_OR_CRL


Properties

$_crlCache

protected Psr\SimpleCache\CacheInterface|null SetaPDF_Signer_ValidationRelatedInfo_Collector::$_crlCache

A cache instance for CRLs.

$_crls

CRL list indexed by md5 hash of the issuers public key.

$_extraCertificates

$_issuerCache

protected Psr\SimpleCache\CacheInterface|null SetaPDF_Signer_ValidationRelatedInfo_Collector::$_issuerCache

A cache instance for resolved issuer certificates.

$_leftCertificates

$_ocspCache

protected Psr\SimpleCache\CacheInterface|null SetaPDF_Signer_ValidationRelatedInfo_Collector::$_ocspCache

A cache instance for resolved OCSP responses.

$_trustedCertificates


Static Methods

getSignatureFieldNames()

WARNING: This method is marked as deprecated!

Use SetaPDF_Signer::getSignatureFieldNames() instead.

Returns all signature field names.

Parameters
$document : SetaPDF_Core_Document
 
Exceptions

Throws SetaPDF_Core_SecHandler_Exception

Throws SetaPDF_Core_Type_Exception

Throws SetaPDF_Core_Type_IndirectReference_Exception

See

Methods

__construct()

The constructor.

Parameters
$trustedCertificates : SetaPDF_Signer_X509_CollectionInterface|null
 
Exceptions

Throws SetaPDF_Signer_Asn1_Exception

_buildPath()

Build a certificate path by a certificate, date and time.

Internally the method tries to gather issuer certificates through the AIA extension of the certificates if the path couldn't be created.

Parameters
$certificate : SetaPDF_Signer_X509_Certificate
 
$dateTime : DateTimeInterface|null
 
$timeZone : DateTimeZone|null
 
Exceptions

Throws SetaPDF_Signer_Asn1_Exception

Throws \Psr\SimpleCache\InvalidArgumentException

Throws SetaPDF_Signer_ValidationRelatedInfo_Exception

_getAllCertificates()

Get a collection with all certificates (trusted + extra).

Exceptions

Throws SetaPDF_Signer_Asn1_Exception

_getByLeftCertificates()

Get validation related information by left certificates.

Parameters
$result : SetaPDF_Signer_ValidationRelatedInfo_Result
 
$certificates : SetaPDF_Signer_X509_Certificate[]
 
$sources : int
 
$dateTime : DateTimeInterface|null
 
$timeZone : DateTimeZone|null
 
Exceptions

Throws SetaPDF_Signer_Asn1_Exception

Throws \Psr\SimpleCache\InvalidArgumentException

Throws SetaPDF_Signer_ValidationRelatedInfo_Exception

_getOcspResponse()

Get an OCSP response by a certificate.

Parameters
$certificate : SetaPDF_Signer_X509_Certificate
 
Exceptions

Throws SetaPDF_Signer_Asn1_Exception

_processCertificate()

Processes a certificate popped from the leftCertificates array.

Parameters
$result : SetaPDF_Signer_ValidationRelatedInfo_Result
 
$sources : int
 
$dateTime : DateTimeInterface|null
 
$timeZone : DateTimeZone|null
 
Exceptions

Throws SetaPDF_Signer_Asn1_Exception

Throws SetaPDF_Signer_Exception

Throws SetaPDF_Signer_ValidationRelatedInfo_Exception

Throws \Psr\SimpleCache\InvalidArgumentException

getByCertificate()

Get validation related information by a certificate.

Parameters
$certificate : SetaPDF_Signer_X509_Certificate
 
$sources : int
 
$dateTime : DateTimeInterface|null
 
$timeZone : DateTimeZone|null
 
$result : SetaPDF_Signer_ValidationRelatedInfo_Result|null
 
Exceptions

Throws SetaPDF_Signer_Asn1_Exception

Throws \Psr\SimpleCache\InvalidArgumentException

Throws SetaPDF_Signer_ValidationRelatedInfo_Exception

getByFieldName()

Get validation related information by a signatue field name.

Parameters
$document : SetaPDF_Core_Document
 
$fieldName : string
 
$sources : int
 
$dateTime : DateTimeInterface|null
 
$timeZone : DateTimeZone|null
 
$result : SetaPDF_Signer_ValidationRelatedInfo_Result|null
 
Exceptions

Throws SetaPDF_Core_Exception

Throws SetaPDF_Core_Parser_Pdf_InvalidTokenException

Throws SetaPDF_Signer_Asn1_Exception

Throws SetaPDF_Signer_Exception

Throws SetaPDF_Signer_ValidationRelatedInfo_Exception

Throws \Psr\SimpleCache\InvalidArgumentException

getByIntegrityResult()

getBySignedData()

Get validation related information by a SignedData object.

Parameters
$signedData : SetaPDF_Signer_Cms_SignedData
 
$sources : int
 
$dateTime : DateTimeInterface|null
 
$timeZone : DateTimeZone|null
 
$result : SetaPDF_Signer_ValidationRelatedInfo_Result|null
 
Exceptions

Throws SetaPDF_Signer_Asn1_Exception

Throws SetaPDF_Signer_Exception

Throws SetaPDF_Signer_ValidationRelatedInfo_Exception

Throws \Psr\SimpleCache\InvalidArgumentException

getCrlCache()

public SetaPDF_Signer_ValidationRelatedInfo_Collector::getCrlCache (
void
): Psr\SimpleCache\CacheInterface|null

Get the cache instance for CRLs.

getExtraCertificates()

getInformationResolverManager()

Get the information resolver manager instance.

If none was explicity was passed before it will create a standard instance with an HTTP resolver that uses cURL.

getIssuerCache()

public SetaPDF_Signer_ValidationRelatedInfo_Collector::getIssuerCache (
void
): Psr\SimpleCache\CacheInterface|null

Get the cache instance for resolved issuer certificates.

getLogger()

Get the logger instance.

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

getOcspCache()

public SetaPDF_Signer_ValidationRelatedInfo_Collector::getOcspCache (
void
): Psr\SimpleCache\CacheInterface|null

Get the cache instance for OCSP responses.

getOcspClient()

getTrustedCertificates()

setCrlCache()

public SetaPDF_Signer_ValidationRelatedInfo_Collector::setCrlCache (
[ Psr\SimpleCache\CacheInterface|null $crlCache = null ]
): void

Set a cache instance for CRLs.

Parameters
$crlCache : Psr\SimpleCache\CacheInterface|null
 

setInformationResolverManager()

setIssuerCache()

public SetaPDF_Signer_ValidationRelatedInfo_Collector::setIssuerCache (
[ Psr\SimpleCache\CacheInterface|null $issuerCache = null ]
): void

Set a cache instance for resolved issuer certificates.

Parameters
$issuerCache : Psr\SimpleCache\CacheInterface|null
 

setOcspCache()

public SetaPDF_Signer_ValidationRelatedInfo_Collector::setOcspCache (
[ Psr\SimpleCache\CacheInterface|null $ocspCache = null ]
): void

Set a cache instance for OCSP responses.

Parameters
$ocspCache : Psr\SimpleCache\CacheInterface|null
 

setOcspClient()

Set an OCSP client instance.

Parameters
$ocspClient : SetaPDF_Signer_Ocsp_Client