Table of contents
Namespace: Com\Tecnick\Pdf\Sign\Timestamp
Final: Yes
File: Config.php line 41
Immutable RFC 3161 Time Stamping Authority (TSA) configuration. The codec fields (hash algorithm, policy OID, nonce) drive request construction; the transport fields (host, timeout, credentials, CA file, peer verification) are consumed by the caller-provided transport.
Tags
- since: 2026-07-15
- category: Library
- author: Nicola Asuni info@tecnick.com
- copyright: 2026 Nicola Asuni - Tecnick.com LTD
- license: https://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE)
- link: https://github.com/tecnickcom/tc-lib-pdf-sign
Constants
HASH_ALGORITHMS
File: Config.php line 51
public array<int, string> HASH_ALGORITHMS = [\Com\Tecnick\Pdf\Sign\DigestAlgorithm::Sha256->value, \Com\Tecnick\Pdf\Sign\DigestAlgorithm::Sha384->value, \Com\Tecnick\Pdf\Sign\DigestAlgorithm::Sha512->value]
Derived from DigestAlgorithm, which is the closed set the constructor enforces and which the CMS side shares.
URL_PATTERN
File: Config.php line 67
public mixed URL_PATTERN = '~^https?://[^\x00-\x20\x7F/?#]+(?:[/?#][^\x00-\x20\x7F]*)?\z~i'
Anchored at both ends, so no control character reaches the host’s transport. The end anchor is \z, not $, which PCRE matches before a final newline. The authority is held to the same character class as the path.
It gates the TSA endpoint a host supplies and the OCSP and CRL URLs Ltv\ValidationMaterial reads out of a certificate extension.
Properties
$cert read-only
File: Config.php line 102
public string $cert = ''
$hashAlgorithm read-only
File: Config.php line 73
public string $hashAlgorithm
$host read-only
File: Config.php line 93
public string $host
$nonceEnabled read-only
File: Config.php line 96
public bool $nonceEnabled = true
$password read-only
File: Config.php line 100
public string $password = ''
$policyOid read-only
File: Config.php line 95
public string $policyOid = ''
$timeout read-only
File: Config.php line 97
public int $timeout = 5
$username read-only
File: Config.php line 99
public string $username = ''
$verifyPeer read-only
File: Config.php line 98
public bool $verifyPeer = true
Methods
__construct()
File: Config.php line 92
public __construct(string $host[, string|DigestAlgorithm $hashAlgorithm = 'sha256' ][, string $policyOid = '' ][, bool $nonceEnabled = true ][, int $timeout = 5 ][, bool $verifyPeer = true ][, string $username = '' ][, string $password = '' ][, string $cert = '' ]) : mixed
Parameters
- $host : string: TSA endpoint URL (http or https).
- $hashAlgorithm : string|DigestAlgorithm = ‘sha256’: Message-imprint digest name or enum case.
- $policyOid : string = ‘’: Optional requested TSA policy OID (dotted form).
- $nonceEnabled : bool = true: Add a random nonce to the request.
- $timeout : int = 5: Transport timeout in seconds (>= 1), for the host.
- $verifyPeer : bool = true: Validate the TSA TLS certificate, for the host.
- $username : string = ‘’: Optional HTTP basic-auth username, for the host.
- $password : string = ‘’: Optional HTTP basic-auth password, for the host.
- $cert : string = ‘’: Optional CA bundle path, for the host.
Tags
- throws: Exception If any option is invalid.
__debugInfo()
File: Config.php line 141
public __debugInfo() : array<string, mixed>
Return values
array<string, mixed>