setasign\SetaPDF2\Signer\ValidationRelatedInfo

IntegrityResult Class representing an integrity result of a signature by its field name.

File: /SetaPDF v2/Signer/ValidationRelatedInfo/IntegrityResult.php
Old class name (alias): \SetaPDF_Signer_ValidationRelatedInfo_IntegrityResult

Class hierarchy

Summary

Constants

STATUS_CADES_INVALID_SIGNING_CERTIFICATE

Status if the signed attribut SigningCertificateV2 doesn't matched the signing certificate.

STATUS_CADES_SIGNING_CERTIFICATE_V2_MISSING

Status if the signature is a PAdES one but the required signed attribute (SigningCertificateV2) is missing.

STATUS_DIFFERENT_SIGNED_DATA_VALUE

Status if the signature data of the field is different to the one resolved by the byte range.

STATUS_INVALID_CONTENTS_DATA

Status if the Contents entry has invalid data.

STATUS_INVALID_DATA_IN_BYTE_RANGE

Status if the signature data resolved by the byte range has more data then a single signature value.

STATUS_INVALID_SIGNATURE

Status if a signature could not be validated.

STATUS_INVALID_TIMESTAMP_MESSAGE_IMPRINT

Status if the message imprint of the timestamp signature doesn't match the data of the document.

STATUS_INVALID_TIMESTAMP_SIGNATURE

Status if a timestamp signature could not be validated.

STATUS_MISSING_ENCAPSULATED_CONTENT

Status if the eContent element is missing but required.

STATUS_NOT_SIGNED

public const int IntegrityResult::STATUS_NOT_SIGNED = 0

Status for a field that is not signed.

STATUS_VALID

public const int IntegrityResult::STATUS_VALID = 1

Status for a valid signature.


Properties

$_field

The signature field.

$_isSignedRevision

Wether the signature covers the whole document or only a revision.

$_status

protected int IntegrityResult::$_status

The status.


Static Methods

create()

Create an integrity result instance.

Parameters
$document : \SetaPDF_Core_Document
 
$fieldName : string

The signature field name in UTF-8 encoding

Exceptions

Throws \setasign\SetaPDF2\Core\Exception

Throws \setasign\SetaPDF2\Core\Parser\Pdf\InvalidTokenException

Throws \setasign\SetaPDF2\Signer\Asn1\Exception

Throws \setasign\SetaPDF2\Signer\Exception


Methods

getField()

Get the signature field instance.

getSignedData()

Get access to the signed data object of the signature field.

getStatus()

public IntegrityResult::getStatus (
void
): int

Get the status of the integrity of the signature field.

isSignedRevision()

public IntegrityResult::isSignedRevision (
void
): bool

Checks whether the signature covers the whole document or only a revision.

isValid()

public IntegrityResult::isValid (
void
): bool

Checks whether the integrity of the signature of the given field is valid.