SetaPDF_Signer_DocumentSecurityStore Class representing a "Document Security Store" in a PDF document.

File: /SetaPDF/Signer/DocumentSecurityStore.php

Class hierarchy

Summary

Properties

$_document


Methods

__construct()

public SetaPDF_Signer_DocumentSecurityStore::__construct ( SetaPDF_Core_Document $document )

The constructor.

Parameters
$document : SetaPDF_Core_Document
 

_addStream()

protected SetaPDF_Core_Type_IndirectObject SetaPDF_Signer_DocumentSecurityStore::_addStream ( string $type, string $data )

Adds a stream to the DSS data.

Parameters
$type : string

The type/key to which the data should be added.

$data : string
 

_getStreams()

protected array SetaPDF_Signer_DocumentSecurityStore::_getStreams ( string $type )

Get a stream by its type from the DSS dictionary.

Parameters
$type : string
 

addCRL()

public SetaPDF_Core_Type_IndirectObject SetaPDF_Signer_DocumentSecurityStore::addCRL ( string $crl )

Add a CRL to the CRLs entry in the DSS dictionary.

Parameters
$crl : string
 

addCRLs()

public void SetaPDF_Signer_DocumentSecurityStore::addCRLs ( string[] $crls )

Add CRLs to the CRLs entry in the DSS dictionary.

Parameters
$crls : string[]
 

addCertificate()

public SetaPDF_Core_Type_IndirectObject SetaPDF_Signer_DocumentSecurityStore::addCertificate ( string $certificate )

Add a certificate to the Certs entry in the DSS dictionary.

Parameters
$certificate : string
 

addCertificates()

public void SetaPDF_Signer_DocumentSecurityStore::addCertificates ( string[] $certificates )

Add certificates to the Certs entry in the DSS dictionary.

Parameters
$certificates : string[]
 

addOCSP()

public SetaPDF_Core_Type_IndirectObject SetaPDF_Signer_DocumentSecurityStore::addOCSP ( string $ocsp )

Add a OCSP response to the OCSPs entry in the DSS dictionary.

Parameters
$ocsp : string
 

addOCSPs()

public void SetaPDF_Signer_DocumentSecurityStore::addOCSPs ( string[] $ocsps )

Add OCSP responses to the OCSPs entry in the DSS dictionary.

Parameters
$ocsps : string[]
 

addValidationRelatedInfo()

public void SetaPDF_Signer_DocumentSecurityStore::addValidationRelatedInfo ( string $key [, array $crls = array ( ) [, array $ocsps = array ( ) [, array $certs = array ( ) [, null|SetaPDF_Core_DataStructure_Date|DateTime|string $timestamp = null ]]]] )

Add validation related information to the VRI dictionary of the DSS dictionary.

Parameters
$key : string

The sha1 digest of the signature.

$crls : array

An array of strings or SetaPDF_Core_Type_IndirectObjectInterface to streams of the CRLs.

$ocsps : array

An array of strings or SetaPDF_Core_Type_IndirectObjectInterface to streams of the OCSPs.

$certs : array

An array of strings or SetaPDF_Core_Type_IndirectObjectInterface to streams of the certs.

$timestamp : null|SetaPDF_Core_DataStructure_Date|DateTime|string
 

addValidationRelatedInfoByField()

public void SetaPDF_Signer_DocumentSecurityStore::addValidationRelatedInfoByField ( string $fieldName [, array $crls = array ( ) [, array $ocsps = array ( ) [, array $certs = array ( ) [, null|SetaPDF_Core_DataStructure_Date|DateTime|string $timestamp = null ]]]] )

Add validation related information to the VRI dictionary of the DSS dictionary by a specific signature field.

Parameters
$fieldName : string

The signature field name.

$crls : array

An array of strings or SetaPDF_Core_Type_IndirectObjectInterface to streams of the CRLs.

$ocsps : array

An array of strings or SetaPDF_Core_Type_IndirectObjectInterface to streams of the OCSPs.

$certs : array

An array of strings or SetaPDF_Core_Type_IndirectObjectInterface to streams of the certs.

$timestamp : null|SetaPDF_Core_DataStructure_Date|DateTime|string
 

cleanUp()

public void SetaPDF_Signer_DocumentSecurityStore::cleanUp ( void )

Release cycled references.

getCRLs()

public string[] SetaPDF_Signer_DocumentSecurityStore::getCRLs ( void )

Get all CRLs the OCSPs entry in the DSS dictionary.

getCertificates()

public string[] SetaPDF_Signer_DocumentSecurityStore::getCertificates ( void )

Get all certificates from the Certs entry in the DSS dictionary.

getDictionary()

public null|SetaPDF_Core_Type_Dictionary SetaPDF_Signer_DocumentSecurityStore::getDictionary ( [ bool $create = false ] )

Get and/or creates the DSS dictionary.

Parameters
$create : bool
 

getOCSPs()

public string[] SetaPDF_Signer_DocumentSecurityStore::getOCSPs ( void )

Get all OCSP responses from the OCSPs entry in the DSS dictionary.

getSignatureDigest()

public string SetaPDF_Signer_DocumentSecurityStore::getSignatureDigest ( string $fieldName )

Get the signature digest of a signature field, which can be used as an index in the VRI dictionary.

For a document signature the bytes that are hashed are those of the signature's DER-encoded PKCS#7 (and its derivatives) binary data object (base-16 decoded byte string in the Contents entry in the signature dictionary).

For the signatures of the CRL and OCSP response, it is the respective signature object represented as a BER-encoded OCTET STRING encoded with primitive encoding.

For a Time-stamp's signature it is the bytes of the Time-stamp itself since the Time-stamp token is a signed data object.
Parameters
$fieldName : string
 

getValidationRelatedInfo()

public array|array[]|bool SetaPDF_Signer_DocumentSecurityStore::getValidationRelatedInfo ( [ null|string $key = null ] )

Get validation related information.

Parameters
$key : null|string

The sha1 digest of the signature to get a specific information. Otherwise all found validation data is returend.

getValidationRelatedInfoByField()

public array|array[]|bool SetaPDF_Signer_DocumentSecurityStore::getValidationRelatedInfoByField ( string $fieldName )

Get validation related information by a signature field name.

Parameters
$fieldName : string

The signature field name.