Guides
6. Timestamps and OCSP
Add RFC 3161 timestamps from Trufo Timestamp Authority (TSA) and stapled Online Certificate Status Protocol (OCSP) responses to an in-house C2PA signer (c2pa-rs, c2patool, camera firmware, or custom software). This guide applies whether your signing certificates come from Trufo CA (5. C2PA Certificates, 7. CAWG Identity) or from another CA. If Trufo signs for you (Managed Signing), Trufo handles both automatically.
An RFC 3161 timestamp proves the signature was created while the signing certificate was valid, so the asset stays verifiable after the certificate expires (long-term validation / LTV). A stapled OCSP response embeds the certificate’s revocation status at signing time, so validators do not depend on a live OCSP lookup later. You can use Trufo TSA with a certificate from any CA without Organization Validation; OCSP must come from the CA that issued your certificate.
1. Wire Your Signer to the Test TSA
https://test.tsa.trufo.ai/ is free and needs no account or API key.
- It signs with a self-signed test certificate outside TCA Test Root CA, so
c2pa-rsreportstimeStamp.untrustedunless you relax timestamp trust in your test settings (Verification). Use it only for test assets (such as Trufo dummy and Test Flow certificates). https://test.tsa.trufo.ai/api-keyreturns the same response but requires the literal headerX-API-Key: test-api-key-header(401otherwise). Point your signer here to confirm it sends the header before you switch to production.
Run a quick smoke test against the test TSA (verifying both reachability and header wiring):
printf 'hello trufo\n' > sample.txt
openssl ts -query -data sample.txt -sha256 -cert -no_nonce -out request.tsq
curl -fsS -X POST https://test.tsa.trufo.ai/api-key \
-H "Content-Type: application/timestamp-query" \
-H "X-API-Key: test-api-key-header" \
--data-binary @request.tsq -o response.tsr
openssl ts -reply -in response.tsr -text
Checkpoint: the reply should report Status: Granted. and a Policy OID: of 1.3.6.1.4.1.62524.2.1.
2. Set Up the Production TSA
Prerequisites
- Trufo account with MFA (2. Trufo Account Setup). Organization Validation (OV) is not required for TSA alone.
- Active C2PA TSA plan (
c2pa_tsa_api). - An API key with the
tsascope, stored withtrufo set-api-key tsa <key>orTRUFO_TSA_API_KEY. Keep it on backend infrastructure, not in client apps or device firmware (2. Trufo Account Setup).
The shared endpoint is https://tsa.trufo.ai/. For high sustained throughput or regional requirements (for example, a dedicated EU endpoint), contact support@trufo.ai about a dedicated https://{host}.tsa.trufo.ai/ endpoint.
Send requests
POST a DER TimeStampReq to https://tsa.trufo.ai/ with Content-Type: application/timestamp-query and X-API-Key: tsa:<key> (the full key, including the tsa: prefix). The unauthenticated GET /policy returns the policy OID and accepted digests. Limits and error codes are in Timestamp Authority (RFC 3161).
Wire it into your signer
c2pa-rs: wrap yourSigner(orAsyncSigner) so thattime_authority_url()returnshttps://tsa.trufo.ai/andtimestamp_request_headers()returns theX-API-Keyheader. The full wrapper, which also serves OCSP, is in Withc2pa-rs.c2patool, C FFI, and other clients without custom headers: run a private reverse proxy that adds the header, and set the client’s TSA URL tohttp://<internal-proxy-host>/tsa/(the trailing slash matters). Do not expose the proxy publicly. See Withc2patoolor clients without custom headers.
location /tsa/ {
proxy_pass https://tsa.trufo.ai/;
proxy_ssl_server_name on; # sends SNI for tsa.trufo.ai
proxy_set_header X-API-Key "<YOUR_TSA_API_KEY>";
}
3. Staple OCSP Responses
https://ocsp.trufo.ai covers certificates issued by Trufo CA only. If you use Trufo TSA with another CA’s certificate, fetch OCSP from that CA, or do not staple.
Requests are unauthenticated (POST with Content-Type: application/ocsp-request, or GET /{base64_request}). Operational rules:
- Use the issuer-pinned path for the certificate’s direct issuing CA:
/c2paforc2pa-l1andc2pa-l2,/cawgforcawg-interim.https://test.ocsp.trufo.aiserves/c2paonly, for Test Flow certificates. - Each response is valid for 7 days (
thisUpdatetonextUpdate); the responder refreshes its revocation cache about every 60 seconds. - Cache one response per active leaf certificate and refresh it on a schedule well before
nextUpdate(for example, every 12–24 hours), and immediately after rotating or revoking a certificate. Never fetch per signature.
Endpoint and response details are in OCSP Responder (RFC 6960).
Wire it into c2pa-rs
In the same Signer wrapper, return None from ocsp_val() until the first response is fetched, never an empty slice, and add 16 KB headroom in reserve_size() to avoid a COSE buffer overflow. See With c2pa-rs.
4. Verify End to End
Three checks confirm the setup:
- Timestamp: a token from the TSA verifies with
openssl tsagainst the C2PA Timestamping CA (CTSA) chain. - OCSP:
openssl ocspreports your leaf certificate asgood, after you convert the downloaded DER.crtissuer and root files to PEM. - Signed asset: a test file signed by your signer, inspected at verify.trufo.ai or with the
c2pa-rsReader, shows a trusted timestamp and the stapled OCSP status.
The commands for the first two checks are in Timestamping and OCSP, and the third in Verification.
Next Steps
- Sign
cawg.identityassertions under your organization’s verified identity: 7. CAWG Identity. - Add durable watermarks to assets from your own signer: 8. Watermarking with Pawprint.