SetTimeStampServer

Digital signatures

Description

Selects the RFC 3161 time-stamp authority the built-in client talks to.

Syntax

Delphi

Function TPDFlib.SetTimeStampServer(Const URL, UserName, Password: WideString): Integer;

Parameters

URLThe authority endpoint; must be an http or https address.
UserNameBasic authentication user name, or an empty string for an anonymous authority.
PasswordBasic authentication password.

Return values

1The setting was stored.

Remarks

The address is validated when a request is actually sent, so a scheme other than http or https is reported through GetTimeStampError rather than raising.

Pair this with SetTimeStampOptions to choose the digest algorithm and whether the authority should embed its signing chain in the token.

Example

PDF.SetTimeStampServer('https://tsa.example.com/tsa', '', '');
PDF.SetTimeStampOptions(2, 1, 1, 15000, '');

See also

SetTimeStampOptions, FetchTimeStampToken, ApplyPAdESSignatureTimeStamp