Feature notes: TLS implementation notes (RFC map)
ONE LINE OF THE CLEARTEXT SURFACE.
Host exact and case-insensitive; '' matches any host. Naming the host is the difference between "the PKI subdomain serves CRLs" and "this server serves CRLs", which is the distinction an audit turns on. Path an exact path, or a prefix when it ends in '/'.
Host : string;
Path : string;
Kind : tPlainTextKind;
Source : string;
ContentType: string;
MaxAgeSecs : Integer;
The pre-signed OCSP responses, keyed by the base64url request string exactly as it arrives in the URL. Implemented by whoever owns the CA; this unit only reads it.
Lookup MUST be cheap and MUST NOT block: it is called from a plaintext worker thread holding one of a small number of slots. An implementation that consults a database on a miss has reintroduced the very cost this design removes.
function Lookup(const aRequest: string; out aResponse: TBytes): Boolean;
function Ready: Boolean;
inherits from TInterfacedObject
implements iPlainTextOcspCache
A default in-memory cache. The producer calls Publish for each response it has signed; readers never block on the producer for longer than a copy.
constructor Create;
destructor Destroy; override;
function Lookup(const aRequest: string; out aResponse: TBytes): Boolean;
function Ready: Boolean;
procedure Publish(const aRequest: string; const aResponse: TBytes);
procedure BeginPublish;
procedure EndPublish;
function Count: Integer;
function LoadFromDirectory(const aDir: string; out aRejected: Integer): Integer;
The answer this unit gives the redirect handler. Status 0 means "not mine, redirect as usual" - the fall-through that keeps the existing behaviour the default.
Status : Integer;
Body : TBytes;
ContentType: string;
MaxAgeSecs : Integer;
constructor Create;
destructor Destroy; override;
procedure AddRule(const aRule: tPlainTextRule); overload;
procedure AddStaticFile(const aHost, aPath, aFile, aContentType: string; aMaxAgeSecs: Integer);
procedure AddOcsp(const aHost, aPathPrefix: string; aMaxAgeSecs: Integer);
procedure Clear;
function RuleCount: Integer;
function Rule(aIndex: Integer): tPlainTextRule;
function Answer(const aHost, aPath, aQuery: string; out aAnswer: tPlainTextAnswer): Boolean;
function Claims(const aHost, aPath: string): Boolean;
function TryEnter: Boolean;
procedure Leave;
function BusyAnswer: tPlainTextAnswer;
property Ocsp: iPlainTextOcspCache read fOcsp write fOcsp;
property MaxResourceSlots: Integer read fMaxResourceSlots write fMaxResourceSlots;
property ResourceLive: Integer read fResourceLive;