Native signed OCSP requests

Security and signatures

Requires the Enterprise edition — part of the Enterprise signature verification and revocation surface in TPDFlibSignatureVerifier (unit PDFlibEntSignVerify)

Description

SetNativeOCSPRequestPFX gives the verifier a PKCS#12 requestor identity, and every generated OCSP request then carries a SHA-256 signature, a requestorName directory name and the included signer chain. Use it when a responder requires authenticated requestors, keeping in mind that request signing adds no trust in the returned response.

Explicit identity configuration

Loaded := Verifier.SetNativeOCSPRequestPFX(PFXBytes, Password, ErrorText);
Loaded := Verifier.SetNativeOCSPRequestPKCS11(Token, [IssuingCADER], ErrorText);
Configured := Verifier.HasNativeOCSPRequestIdentity;
Verifier.ClearNativeOCSPRequestIdentity;

SetNativeOCSPRequestPFX loads a private key and matching certificate from DER PKCS#12 bytes, using a UTF-8 password and returning a diagnostic through ErrorText on failure

A successful load replaces the previous request identity; a failed load leaves an existing identity configured, and explicit clearing disables request signing

The verifier owns the loaded native identity and releases it on replacement, clearing or destruction; opening another PDF or clearing document trust anchors preserves the request identity

HasNativeOCSPRequestIdentity reports a loaded identity; signing usage, current certificate validity and algorithm availability are checked when a request needs to be generated

The password is used during loading and is not retained by the verifier

SetNativeOCSPRequestPKCS11 uses the RSA, RSASSA-PSS, ECDSA or EdDSA key and certificate that a configured TPDFlibPKCS11Client selects on a hardware token, connecting it when needed; the private key never leaves the token. The array lists CA certificates (DER) sent after the signer certificate, since a token usually holds only the end-entity certificate

An RSASSA-PSS token certificate signs with SHA-256, MGF1 with SHA-256 and a 32-byte salt; a certificate whose PSS parameters require another digest or a longer salt is rejected before the token is asked to sign

The verifier references the client rather than owning it, so the client must stay alive while the identity is configured; replacing or clearing the identity releases the reference, and token PIN and session handling remain the client's responsibility

Wire profile

With an identity configured, every generated native OCSP request is signed with SHA-256 and contains requestorName as the certificate's directoryName, the public signer certificate and any chain supplied in the PFX or with the token identity

The profile supports the native defaults of qualified RSA, ECDSA and RSA-PSS keys, whose constraints must permit SHA-256, and Ed25519 or Ed448 keys, which sign the request encoding directly as RFC 8410 defines

Without a configured identity, requests retain their existing unsigned form; the PDF signer's certificate never implicitly selects a request credential

Signed requests preserve the exact CertID and optional nonce policy; signature, nonce and method selection are independent configuration choices

The complete signed request is reused for one certificate/issuer pair within a verification call, including GET/POST fallback and alternate responder URLs

Reuse also matters when nonce is disabled because ECDSA or RSA-PSS signatures can otherwise change the encoded request and defeat duplicate suppression

NativeOCSPHTTPMethod applies to the complete signed request; GET preference usually selects POST when embedded certificates make the encoded URL exceed 255 UTF-8 bytes

Trust and failure behavior

Request authentication does not add document trust anchors, change DSS inventory or establish trust in an OCSP response; the responder independently decides whether to authorize the requestor

Document signature integrity, base path trust, OCSP response signature, responder authorization, exact certificate identity and time checks remain separate requirements

A configured identity that cannot sign produces no OCSP request for that certificate; the verifier does not silently retry it unsigned

Other authenticated supplied evidence and CRL fallback remain eligible, and complete cached coverage does not require a network request or use of the request credential

OCSPRequestSigningError in TPDFlibSignatureChainReport and TPDFlibTimeStampVerificationReport is 0 when no request-signing failure was observed and 50 when native request signing failed

This diagnostic can coexist with a valid result established by CRLs; server authorization failures do not by themselves mean that local request signing failed

Timestamp verification uses the current time to check its request authentication certificate, while evidence validation retains the token's fixed UTC GenerationTime

Bounds and low-level API

PFX input retains the 16 MiB native identity limit; unsigned input and signed output requests are each bounded to 64 KiB

At most 1024 identity certificates are included, and their encoded bytes must fit the request allowance; the existing shared HTTP request and response budgets remain in force

TPDFNativeSigningIdentity.SignOCSPRequest accepts one complete unsigned certificate request and returns cleared output on failure, with a separate diagnostic

The low-level RSAPSSPadding property controls CMS signatures; an explicit override is rejected for OCSP, while constrained RSA-PSS identities use their own native parameters

PLNativeVerifyCMSChainWithEvidenceAtTime accepts an optional RequestIdentity as its final parameter and reports RequestSigningError in its native OCSP summary; the caller retains identity ownership for the duration of that call

Availability and qualification

These verifier methods are available through the Delphi and Free Pascal class interface; Windows returns an unsupported diagnostic when loading a native request identity and leaves HasNativeOCSPRequestIdentity false

Actual runtime qualification covers Linux x64 FPC 3.3.1 with OpenSSL 3.5.5, including independently verified RSA, ECDSA, RSA-PSS and Ed25519 request signatures

Expired or future credentials, inappropriate key usage, unsupported SHA-256 key constraints and unsupported digest-free keys do not produce unsigned fallback

Additional algorithms, external request-signing providers and further target hosts require separate qualification or implementation

See also

Native OCSP nonce policy, Native OCSP revocation, TPDFlibSignatureVerifier