setasign\SetaPDF2\Signer\Tsp

Token Class representing a Timestamp Token

File: /SetaPDF v2/Signer/Tsp/Token.php
Old class name (alias): \SetaPDF_Signer_Tsp_Token

Class hierarchy

Summary

Static Properties

$usePhpseclibForRsaPss

Flag defining whether usage of phpseclib or default OpenSSL methods for RSA_PSS validation.

$verifyCallback

A callable that can be used to implement individual verification logic.


Properties

$_detachedSignedData

$_message

$_signedAttributes

$_tstInfo

protected Token::$_tstInfo

$_unsignedAttributes


Methods

__construct()

_getSignedData()

Get SignedData element from the ASN.1 structure.

_getSignerInfo()

Get the SignerInfo element from the ASN.1 structure.

Exceptions

Throws \setasign\SetaPDF2\Signer\Exception

_getTstInfo()

Get the timestamp token info element.

getAsn1()

Get the ASN.1 instance of the SignedData element.

getCertificates()

Get all certificates embedded in the SignedData structure.

Exceptions

Throws \setasign\SetaPDF2\Signer\Asn1\Exception

getDigestAlgorithm()

getDigestAlgorithms()

Get the digest algorithms and parameters.

Return Values

An array of arrays where the first value holds the OID of the algorithm. The second value is the ASN.1 structure of the parameters.

Exceptions

Throws \setasign\SetaPDF2\Signer\Exception

getGenerationTime()

Get the generation time.

getIssuerAndSerialNumber()

Get issuer and serial number of the signee.

Exceptions

Throws \setasign\SetaPDF2\Signer\Asn1\Exception

Throws \setasign\SetaPDF2\Signer\Exception

getMessageImprint()

Get the message imprint element.

getNonce()

public Token::getNonce (
void
): bool|string

Get the none value.

getSerialNumber()

public Token::getSerialNumber (
void
): string

Get the serial number of the token.

getSignatureAlgorithm()

Return Values

The first value holds the OID of the algorithm. The second value is the ASN.1 structure of the parameters.

Exceptions

Throws \setasign\SetaPDF2\Signer\Exception

getSignatureValue()

public \setasign\SetaPDF2\Signer\Cms\SignedData::getSignatureValue (
bool $hex = true
): string
Parameters
$hex : bool
 
Exceptions

Throws \setasign\SetaPDF2\Signer\Exception

getSignedAttribute()

Get a signed attribute by its OID.

Parameters
$oid : string
 
Exceptions

Throws \setasign\SetaPDF2\Signer\Exception

getSignedAttributes()

getSubjectKeyIdentifier()

Get the subject key identifier.

Exceptions

Throws \setasign\SetaPDF2\Signer\Exception

getUnsignedAttribute()

Get an unsigned attribute by its OID.

Parameters
$oid : string
 
Exceptions

Throws \setasign\SetaPDF2\Signer\Exception

getUnsignedAttributes()

setDetachedSignedData()

public Token::setDetachedSignedData (
\setasign\SetaPDF2\Core\Reader\FilePath|string $detachedSignedData
): void

Overwritte to disable this method. It is not allowed to use it in a timestamp token instance.

Parameters
$detachedSignedData : \setasign\SetaPDF2\Core\Reader\FilePath|string
 
Exceptions

Throws \setasign\SetaPDF2\Signer\Exception

verifyMessageImprint()