PDFium Delphi Component Docs

FPdfCryptoOcsp unit

Unit: FPdfCryptoOcsp
Resource-limited OCSP DER and freshness checks used by both the OpenSSL and native macOS verification backends

Syntax

function FreshOcspResponse(const Der: TBytes; UtcNow: TDateTime): Boolean;
function CryptoUtcNow: TDateTime;

Functions

FunctionDescription
FreshOcspResponseReturns True only if Der contains a size-limited, successful basic OCSP response and all its responses satisfy the freshness rules relative to UtcNow; the check filters input but does not authenticate evidence
CryptoUtcNowObtains the current UTC TDateTime through platform time-zone conversion, rather than assuming that local time is UTC

Resource limits and freshness

CheckLimit or behaviour
DER response sizeMust be nonempty and no larger than 1 MiB
SingleResponse entriesRequires at least one entry and accepts at most 64
Clock skewAllows 300 seconds when testing future times or expiry
producedAt and thisUpdateMust be no more than one day old or further into the future than the permitted skew
nextUpdateIf supplied, must be at least thisUpdate and remain valid after allowing for skew
Malformed or unsupported responseReturns False for these inputs, including failed outer OCSP responses and unsupported response types

Authentication is still necessary

True merely allows the native verifier to proceed with the response; it establishes neither the responder's signature or authority nor the issuer match, certificate identifier or positive certificate status

FPdfCryptoSsl authenticates OCSP using OpenSSL, whilst FPdfCryptoMac uses Security.framework for supplied responses; inspect their separate signature, trust and revocation results instead of treating FreshOcspResponse as a revocation decision

The helper makes no HTTP requests, installs no trust anchors, leaves system trust unchanged and keeps no persistent cache; supplying UTC explicitly also makes time-boundary tests deterministic

See Also

FPdfCrypto, FPdfCryptoSsl, FPdfCryptoMac, FPdfAsn1