setasign\SetaPDF2\Signer\ValidationRelatedInfo
Collector Class offering methods to collect validation related information.
File: /SetaPDF v2/Signer/ValidationRelatedInfo/Collector.php
Old class name (alias):
\SetaPDF_Signer_ValidationRelatedInfo_Collector
Class hierarchy
Summary
Methods
- __construct()
- _buildPath()
- _getAllCertificates()
- _getByLeftCertificates()
- _getOcspResponse()
- _processCertificate()
- getByCertificate()
- getByFieldName()
- getByIntegrityResult()
- getBySignedData()
- getCrlCache()
- getExtraCertificates()
- getInformationResolverManager()
- getIssuerCache()
- getLogger()
- getOcspCache()
- getOcspClient()
- getTrustedCertificates()
- setCrlCache()
- setInformationResolverManager()
- setIssuerCache()
- setLogger()
- setOcspCache()
- setOcspClient()
Constants
SOURCE_CRL
Source constant.
SOURCE_OCSP
Source constant.
SOURCE_OCSP_AND_CRL
Source constant.
SOURCE_OCSP_OR_CRL
Source constant.
Properties
$_crlCache
A cache instance for CRLs.
$_informationResolverManager
The informatio resolver manager.
$_issuerCache
A cache instance for resolved issuer certificates.
$_logger
A logger instance.
$_ocspCache
A cache instance for resolved OCSP responses.
Static Methods
getSignatureFieldNames()
WARNING: This method is marked as deprecated!
Use \setasign\SetaPDF2\Signer\Signer::getSignatureFieldNames() instead.
Returns all signature field names.
Parameters
- $document : \setasign\SetaPDF2\Core\Document
Exceptions
Throws \setasign\SetaPDF2\Core\SecHandler\Exception
Throws \setasign\SetaPDF2\Core\Type\Exception
Throws \setasign\SetaPDF2\Core\Type\IndirectReference\Exception
See
Methods
__construct()
The constructor.
Parameters
- $trustedCertificates : ?\setasign\SetaPDF2\Signer\X509\CollectionInterface
Exceptions
_buildPath()
?\DateTimeInterface $dateTime = null,
?\DateTimeZone $timeZone = null
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 : \setasign\SetaPDF2\Signer\X509\Certificate
- $dateTime : ?\DateTimeInterface
- $timeZone : ?\DateTimeZone
Exceptions
Throws \Psr\SimpleCache\InvalidArgumentException
Throws Exception
_getByLeftCertificates()
\setasign\SetaPDF2\Signer\X509\Certificate[] $certificates,
int $sources = Collector::SOURCE_OCSP_OR_CRL,
?\DateTimeInterface $dateTime = null,
?\DateTimeZone $timeZone = null
Get validation related information by left certificates.
Parameters
- $result : Result
- $certificates : \setasign\SetaPDF2\Signer\X509\Certificate[]
- $sources : int
- $dateTime : ?\DateTimeInterface
- $timeZone : ?\DateTimeZone
Exceptions
Throws \setasign\SetaPDF2\Signer\Asn1\Exception
Throws \Psr\SimpleCache\InvalidArgumentException
Throws Exception
_getOcspResponse()
Get an OCSP response by a certificate.
Parameters
- $certificate : \setasign\SetaPDF2\Signer\X509\Certificate
Exceptions
Throws Exception
Throws \Psr\SimpleCache\InvalidArgumentException
_processCertificate()
int $sources = Collector::SOURCE_OCSP_OR_CRL,
?\DateTimeInterface $dateTime = null,
?\DateTimeZone $timeZone = null
Processes a certificate popped from the leftCertificates array.
Parameters
- $result : Result
- $sources : int
- $dateTime : ?\DateTimeInterface
- $timeZone : ?\DateTimeZone
Exceptions
Throws \setasign\SetaPDF2\Signer\Asn1\Exception
Throws \setasign\SetaPDF2\Signer\Exception
Throws Exception
Throws \Psr\SimpleCache\InvalidArgumentException
getByCertificate()
int $sources = Collector::SOURCE_OCSP_OR_CRL,
?\DateTimeInterface $dateTime = null,
?\DateTimeZone $timeZone = null,
?Result $result = null
Get validation related information by a certificate.
Parameters
- $certificate : \setasign\SetaPDF2\Signer\X509\Certificate
- $sources : int
- $dateTime : ?\DateTimeInterface
- $timeZone : ?\DateTimeZone
- $result : ?Result
Exceptions
Throws \setasign\SetaPDF2\Signer\Asn1\Exception
Throws \Psr\SimpleCache\InvalidArgumentException
Throws Exception
getByFieldName()
string $fieldName,
int $sources = Collector::SOURCE_OCSP_OR_CRL,
?\DateTimeInterface $dateTime = null,
?\DateTimeZone $timeZone = null,
?Result $result = null
Get validation related information by a signature field name.
Parameters
- $document : \setasign\SetaPDF2\Core\Document
- $fieldName : string
- $sources : int
- $dateTime : ?\DateTimeInterface
- $timeZone : ?\DateTimeZone
- $result : ?Result
Exceptions
Throws \setasign\SetaPDF2\Core\Exception
Throws \setasign\SetaPDF2\Core\Parser\Pdf\InvalidTokenException
Throws \setasign\SetaPDF2\Signer\Asn1\Exception
Throws \setasign\SetaPDF2\Signer\Exception
Throws Exception
Throws \Psr\SimpleCache\InvalidArgumentException
getByIntegrityResult()
int $sources = Collector::SOURCE_OCSP_OR_CRL,
?\DateTimeInterface $dateTime = null,
?\DateTimeZone $timeZone = null,
?Result $result = null
Get validation related information by an integrity result.
Parameters
- $integrityResult : IntegrityResult
- $sources : int
- $dateTime : ?\DateTimeInterface
- $timeZone : ?\DateTimeZone
- $result : ?Result
Exceptions
Throws \setasign\SetaPDF2\Signer\Asn1\Exception
Throws \setasign\SetaPDF2\Signer\Exception
Throws Exception
Throws \Psr\SimpleCache\InvalidArgumentException
getBySignedData()
int $sources = Collector::SOURCE_OCSP_OR_CRL,
?\DateTimeInterface $dateTime = null,
?\DateTimeZone $timeZone = null,
?Result $result = null
Get validation related information by a SignedData object.
Parameters
- $signedData : \setasign\SetaPDF2\Signer\Cms\SignedData
- $sources : int
- $dateTime : ?\DateTimeInterface
- $timeZone : ?\DateTimeZone
- $result : ?Result
Exceptions
Throws \setasign\SetaPDF2\Signer\Asn1\Exception
Throws \setasign\SetaPDF2\Signer\Exception
Throws Exception
Throws \Psr\SimpleCache\InvalidArgumentException
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.
getLogger()
Get the logger instance.
If no logger instance was passed before a new instance of Logger is returned.
setInformationResolverManager()
Set an information resolver manager instance.
Parameters
setIssuerCache()
Set a cache instance for resolved issuer certificates.
Parameters
- $issuerCache : ?\Psr\SimpleCache\CacheInterface
setLogger()
setOcspCache()
Set a cache instance for OCSP responses.
Parameters
- $ocspCache : ?\Psr\SimpleCache\CacheInterface