SetaPDF_Signer_ValidationRelatedInfo_Collector Class offering methods to collect validation related information.
File: /SetaPDF v2/Signer/ValidationRelatedInfo/Collector.php
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.
$_crls
CRL list indexed by md5 hash of the issuers public key.
$_extraCertificates
A collection of extra certificates.
$_informationResolverManager
The informatio resolver manager.
$_issuerCache
A cache instance for resolved issuer certificates.
$_leftCertificates
Certificate that needs to be processed.
$_logger
A logger instance.
$_ocspCache
A cache instance for resolved OCSP responses.
$_trustedCertificates
A collection of trusted certificates.
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
_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
_getAllCertificates()
Get a collection with all certificates (trusted + extra).
Exceptions
_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
_getOcspResponse()
Get an OCSP response by a certificate.
Parameters
- $certificate : SetaPDF_Signer_X509_Certificate
Exceptions
_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
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()
Get validation related information by an integrity result.
Parameters
- $integrityResult : SetaPDF_Signer_ValidationRelatedInfo_IntegrityResult
- $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
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()
Get the cache instance for CRLs.
getExtraCertificates()
Get the extra certificates collection.
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()
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()
Get the cache instance for OCSP responses.
getOcspClient()
Get the OCSP client instance.
getTrustedCertificates()
Get the trusted certificates collection.
setCrlCache()
Set a cache instance for CRLs.
Parameters
- $crlCache : Psr\SimpleCache\CacheInterface|null
setInformationResolverManager()
Set an information resolver manager instance.
Parameters
- $manager : SetaPDF_Signer_InformationResolver_Manager
setIssuerCache()
Set a cache instance for resolved issuer certificates.
Parameters
- $issuerCache : Psr\SimpleCache\CacheInterface|null
setLogger()
Set a logger instance.
Parameters
setOcspCache()
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