- Getting Started
- The Main Class
- Create a Signature Field
- Signature Appearance Modules
- Signature Modules
- Timestamp Modules
- Asynchronous Signature Workflow
- Signing PDF Forms
- Trust Settings
- API Reference
Table of Contents
The SetaPDF-Signer component allows you to add a timestamp to the final digital signature or to add a document level timestamp (PDF 2.0). Such a timestamp is created by a third party that acts as a Time Stamp Authority (TSA). The component will create a hash of the hash value of the signature which will be send to this entity. It will create a digital signature including a timestamp.
If the timestamp is created in a sign() process the result will be re-assembled into the main signature, so that it is part of it. If it is created in a timestamp() process the resulting timestamp token becomes the contents of the signature itself.
Beside the document integrity a timestamp signature will prove that the signed data exists before a certain point if the TSA is trusted.
A timestamp module implements the SetaPDF_Signer_Timestamp_Module_ModuleInterface interface.
Basically it requies the URL of the timestamp server. You can pass additional (or all) parameter, e.g. for authentication, to curl with the setCurlOption() method. All options will be passed to the curl_setopt_array() function.
You can authenticate by username and password by passing them to the setCurlOption() method:
$username = 'yourUserName'; $password = 'yourSecretPassword'; $tsModule->setCurlOption(CURLOPT_USERPWD, $username . ':' . $password);
You also can authenticate with a client certificate by passing the desired options to the setCurlOption() method:
$certFile = 'client-certificate.pem'; $certPassword = 'password'; $tsModule->setCurlOption([ CURLOPT_SSLCERT => $certFile, CURLOPT_SSLCERTPASSWD => $certPassword ]);