API Reference
StreamSec.DSI.KeyManager
Key Container Unit
Classes, interfaces and records
classeKeyManagerError
inherits from Exception
(no public members)
interfaceiKeyBucket
inherits from iBaseInterface
function GetKey: iUnknown;
function GetInternalID: OctetString;
property Key: iUnknown read GetKey;
property InternalID: OctetString read GetInternalID;
interfaceiKeyStorageBucket
inherits from iKeyBucket
function Compare(const aBuf: tBytes): Boolean;
interfaceiKeyIndexBucket
inherits from iKeyBucket
function GetStoreID: string;
property StoreID: string read GetStoreID;
interfaceiSaveable
Implemented by key-container components (indexes, filters) whose contents can be persisted to disk. An application rarely calls these directly: the owning TstKeyManager iterates its stores, indexes and filters in SaveAllSaveable and, for each one that supports this interface AND reports Modified = True, calls SetAbsolutePath/ForceDirectories then SaveToFile(''). Query it via Supports on a container instance when you need to drive that save/load yourself.
function GetModified: Boolean;
Returns whether the container has unsaved changes since it was last loaded or saved. Also reports True when the backing file does not yet exist, so a first-time container is always written. SaveAllSaveable uses this to skip unchanged containers.
procedure SaveToFile(const aDest : TFileName; aHashAlg: tHashAlgorithm = haSHA256);
Serializes the container to aDest, or to the container's own default file name when aDest is '' (the form SaveAllSaveable uses). aHashAlg selects the integrity digest written alongside the data.
procedure SaveToStream(aDest: TStream; aHashAlg: tHashAlgorithm = haSHA256);
Serializes the container to an arbitrary stream, e.g. to embed the key material in your own storage or transport rather than a file. aHashAlg picks the integrity digest.
property Modified: Boolean read GetModified;
True while the container holds unsaved changes (or has no file yet); read it to decide whether a save is needed.
classTstAbstractKeyStorage
(no public members)
classtDSIKeyStoreOption
inherits from tCustomOption
constructor Create(const aIdentifier: string);
classtDSIKeyStoreOptionList
inherits from tCustomOptionList
procedure AddOption(const aIdentifier: string);
Registers aIdentifier (a store name, index name, etc.) as an available option in this list. Used internally when the KeyManager wires a filter or index to the stores/indexes it may draw from - e.g. AddIndex calls this as new indexes appear.
Full description »
procedure RemoveOption(const aIdentifier: string);
Removes aIdentifier from the list, clearing it from the selection too. Called internally when a referenced store or index is deleted so dangling names do not linger.
property EnabledOptions[aIndex: Integer]: iCustomOption read GetEnabledOptions;
Enumerates only the currently SELECTED options (the subset the owning filter or index will actually use), resolving each selected name back to its option object. Returns nil for a selected name with no backing option. Read this to walk the effective set at run time.
(no public members)
classTReentrantRWLock
TReentrantRWLock
A recursive, exclusive lock exposing the BeginRead/EndRead/BeginWrite/EndWrite surface of a TMultiReadExclusiveWriteSynchronizer, but backed by a single reentrant critical section (there is only "owned" vs "not owned"; there is no separate shared-read mode).
WHY THIS EXISTS - DO NOT "optimise" it back to a TMultiReadExclusiveWriteSynchronizer: the container/filter code deliberately calls BeginWrite while already holding a BeginRead on the SAME lock (e.g. TstCustomKeyFilterChain.FindCACertificate / CheckCertificate take Lock.BeginRead, then transitively reach InternalCheckCertificate / InternalAddExplicitlyTrusted which call Lock.BeginWrite). A Delphi MREWS lets the SOLE reader promote to writer, so this worked in single-threaded use - but under >= 2 concurrent readers each attempting that read->write upgrade, every writer waits for all OTHER readers to drain while those other readers are themselves parked in their own BeginWrite, so they wait on each other forever (a permanent, timeout-immune deadlock; see the OCSP stress test). A recursive critical section removes the read/write dichotomy: the owning thread always re-enters (the "upgrade" is just a nested Enter), and a second thread simply waits at its first acquisition holding nothing, so the mutual-wait cycle cannot form. The trade-off is that reads on one container no longer run concurrently (they serialise); that is an accepted, correctness-preserving cost - no code depends on two readers making progress simultaneously, and no container lock is ever held across socket I/O. TCriticalSection is recursive on every supported target (Windows CRITICAL_SECTION / POSIX recursive pthread mutex).
constructor Create;
destructor Destroy; override;
procedure BeginRead;
procedure EndRead;
procedure BeginWrite;
procedure EndWrite;
classTstBaseKeyContainer
inherits from TstCustomMPKey
constructor Create(AOwner: TComponent); override;
Abstract base for the key manager's containers (stores, indexes, filters): owns a locked, sorted list of key buckets and the link to its owning TstKeyManager. Creates the internal lock, child list and key list. Not instantiated directly - applications drop a concrete descendant (a store, index or filter component).
» member page
destructor Destroy; override;
Detaches from the KeyManager, frees the key list, lock and child list.
» member page
class function Description: string; virtual;
Human-readable description of the container class; base returns an empty string, descendants override it. Used by design-time/registration tooling, not normally called by applications.
» member page
procedure Close;
Deactivates the container (sets Enabled := False), which clears its cached key list. Convenience wrapper an application calls to release a store/index/ filter without touching Enabled directly.
» member page
procedure Open;
Activates the container (sets Enabled := True), which populates/loads its key list. Convenience wrapper an application calls to bring a store/index/filter online.
» member page
procedure ValidateName(const aName: string); virtual; abstract;
Validates a proposed name for this container within its KeyManager (e.g. uniqueness of a store/index/filter name); abstract here, descendants raise on a clash. Called internally when the name property is set.
» member page
function GetParentComponent: TComponent; override;
Streaming/ownership plumbing: reports the KeyManager (or parent container) as this component's design-time parent so the IDE nests it correctly.
» member page
function HasParent: Boolean; override;
True when this container has been parented to a KeyManager or another container; part of the component-streaming contract.
» member page
procedure SetParentComponent(AParent: TComponent); override;
Reparents the container: assigning a TstKeyManager wires it to that manager (via KeyManagerName); part of the component-streaming contract, driven by the designer/loader rather than application code.
» member page
function SetKey(const aKey: iUnknown): OctetString; virtual; abstract;
Adds a key to the container and returns the identifier it was stored under; abstract here - a store implements it, a filter refuses it.
» member page
property KeyManagerName: string read fKeyManagerName write SetKeyManagerName;
Name of the TstKeyManager this container belongs to; setting it (re)registers the container with that manager. The container must be disabled to change it.
» member page
property KeyManager: TstKeyManager read fKeyManager;
The resolved TstKeyManager instance this container is attached to (read-only; follows KeyManagerName). Nil until registered.
» member page
property KeyCount: Integer read GetKeyCount;
Number of key entries currently held; activates (CheckEnabled) the container on first access.
» member page
property Keys[const aIdentifier: OctetString]: iUnknown read GetKey; default;
Default indexed lookup: Keys[identifier] returns the key stored under that identifier, or the first/default key when the identifier is empty. This is the primary way an application retrieves a key from a container by its id.
» member page
property List[aIndex: Integer]: iUnknown read GetList;
Enumerates the held keys by position (0..KeyCount-1), returning each key interface; use with KeyCount to walk the container.
» member page
property IDList[aIndex: Integer]: iUnknown read GetIDList;
Enumerates the held entries by position, returning each entry's bucket/id interface rather than the key itself; parallel to List.
» member page
property Enabled;
Activates/deactivates the container: True populates/loads its key list, False clears it. Applications toggle this (or Open/Close) to bring a store/index/ filter online.
» member page
property EnabledDesignTime;
Whether Enabled auto-activates at design time in the IDE; rarely touched by application code.
» member page
property EnabledRunTime;
Whether Enabled auto-activates at run time; set False to defer loading the container until the application enables it itself.
» member page
classTstBaseSaveableKeyContainer
inherits from TstBaseKeyContainer
procedure LoadFromFile(const aSrc : TFileName; aHashAlg: tHashAlgorithm = haDefault); virtual;
Loads the container's entries from a file (its GetDefaultFileName when aSrc is empty). The file is the signed INI-style text produced by SaveTo*; the digest is recomputed and DoVerifySignature is called, so a tampered or mismatched file raises. aHashAlg = haDefault means take the algorithm named in the file's Signature section. Used to restore a persisted index/filter at startup.
» member page
procedure LoadFromStream(aSrc: TStream; aHashAlg: tHashAlgorithm = haDefault); virtual;
Stream form of LoadFromFile: parses the signed INI text from aSrc, verifies the digest and signature, then rebuilds the key list from its Entry sections.
» member page
procedure SaveToFile(const aDest : TFileName; aHashAlg: tHashAlgorithm = haSHA256); virtual;
Persists the container's entries to a file (its GetDefaultFileName when aDest is empty) as signed INI-style text, digested with aHashAlg (SHA-256 by default). An application calls this to save an index/filter it has modified.
» member page
procedure SaveToStream(aDest: TStream; aHashAlg: tHashAlgorithm = haSHA256); virtual;
Stream form of SaveToFile: writes each entry as an INI section plus a Signature section carrying the digest algorithm, Base64 digest and signature (the latter via DoGenerateSignature / the KeyManager).
» member page
property Modified: Boolean read GetModified;
True when the container has unsaved changes since the last load/save - or when its default file does not yet exist. Check it to decide whether to call SaveTo*.
» member page
classTstAbstractKeyIndex
(no public members)
classTstAbstractKeyFilter
inherits from TstBaseSaveableKeyContainer
constructor Create(AOwner: TComponent); override;
Base filter constructor; sets Duplicates to dupIgnore so the same identifier may be added more than once without error. Applications drop a concrete filter (e.g. a revocation/OCSP or blacklist filter) onto the same owner as the KeyManager and wire it up via the published properties below rather than constructing it by hand.
» member page
function IsIdentifierAllowed(const aIdentifier: OctetString): Boolean; virtual;
IsIdentifierAllowed is virtual so a revocation filter (e.g. the OCSP filter) can override the "is this cert allowed" decision - and, on the way through, record a per-certificate status container in a SECONDARY list.
Full description »
function IsKeyAllowed(const aIdentifier: OctetString; const aKey : iUnknown) : Boolean; virtual;
Like IsIdentifierAllowed but also has the resolved key in hand; override when the allow/deny decision depends on the key object itself (the base merely requires a non-nil key plus an allowed identifier). The KeyManager calls this on each filter while filtering candidate keys; any filter returning False hides that key.
» member page
function SetKey(const aKey: iUnknown): OctetString; override;
Not meaningful for a filter: a filter observes/vetoes keys rather than storing them, so this always raises "action not supported". Add keys to a store, not to a filter.
» member page
procedure ValidateName(const aName: string); override;
Enforces that FilterName is unique within the owning KeyManager; raises if another filter already uses aName. Called internally when FilterName is set - applications rarely call it directly.
» member page
property KeyManagerName;
Name of the TstKeyManager this filter attaches to. Set it (design- or run-time) so the filter registers itself with that manager and takes part in its key-lookup filtering.
» member page
property FilterName: string read fFilterName write SetFilterName;
Unique name identifying this filter within its KeyManager; used by FindFilter/EnsureFilterForIndicies to locate it. Set a stable name when other wiring must reference the filter.
» member page
property KeyIndexes: tDSIKeyStoreOptionList read fKeyIndexes write SetKeyIndexes;
The key indexes whose keys this filter should draw its filtering identifiers from (the filter's "own" identifiers). Select the index names here to tell the filter which indexes supply the keys it evaluates.
» member page
property SecondaryIndexes: tDSIKeyStoreOptionList read fIndexes write SetIndexes;
Secondary indexes used to expand a filtered key into its associated identifiers, so blocking one identifier also blocks the other identifiers that resolve to the same key. Select the additional index names to include in that cross-referencing.
» member page
classTstAbstractKeyIndex
inherits from TstBaseSaveableKeyContainer
implements iSaveable
class function Unequivocal: Boolean; virtual;
Class attributes Only one identifier per key True means each key maps to exactly one identifier, so GetKey can stop at the first hashed hit; a False-returning index (e.g. one keyed on a substring/alias) makes GetKey fall back to a linear IsIdentifierForKey scan. Apps rarely call this directly - it is descriptive metadata the key manager uses when looking a key up.
» member page
class function Unique: Boolean; virtual;
Only one key per identifier Describes whether an identifier can select at most one key in this index class. Purely descriptive metadata: no code in the library currently reads it, and application code does not normally call it. (Duplicate handling is governed by the Duplicates property, not by this flag.)
» member page
class function KeyPair: Boolean; virtual;
Same identifier for the private key and the public key When True the same identifier addresses both halves of a key pair, so an app that indexed a public key can retrieve the matching private key (or vice versa) under one identifier. Descriptive metadata for the index class.
» member page
function GetIdentifierForNewKey(const aKey : iUnknown; const aStoreID : string = ''; aOverrideReadOnly: Boolean = False) : OctetString;
Computes the lookup identifier a new key would receive in this index, without inserting it (the actual insertion is done later by AddKeyToIndex).
Full description »
function IsValidIdentifier(const aIdentifier: OctetString): Boolean;
Returns True if aIdentifier is a syntactically valid lookup key for this index class (e.g. a well-formed digest, thumbprint or name). Use it to pre-validate user-supplied search criteria before calling GetKey/GetKeys.
» member page
function IsIdentifierForKey(const aIdentifier: OctetString; const aKey : iUnknown) : Boolean;
Returns True if aIdentifier is one of the identifiers under which aKey is (or would be) filed in this index. Handy when confirming that a key you already hold matches a searched-for identifier, especially for non- Unequivocal indexes where one key answers to several identifiers.
» member page
function GetIdentifier(const aKey: iUnknown): OctetString;
Returns the (primary) identifier under which aKey is filed in this index, i.e. the value you would later pass to GetKey to retrieve it. Use it to discover the lookup handle of a key you already have in hand.
» member page
function GetKey(const aIdentifier: OctetString): iUnknown; override;
Retrieves the single key filed under aIdentifier (an empty identifier yields the default key), applying the key manager's filters so a key blocked by policy is not returned. This is the everyday lookup an app uses to fetch, say, a certificate or private key by its digest/name/thumbprint.
» member page
function GetUnfilteredKey(const aIdentifier: OctetString): iUnknown;
Like GetKey but bypasses the key-manager filters, returning the key even when a filter would normally hide it. Use only when you deliberately need the raw stored key regardless of the active filtering policy.
» member page
procedure GetKeys(const aIdentifier: OctetString; aList : IInterfaceList; aUnfiltered: Boolean = False); overload;
Collects every key filed under aIdentifier into aList (there can be several when the index class is not Unique). Use this list-based overload when you want to enumerate all matches at once; pass aUnfiltered = True to skip the key-manager policy filter.
» member page
procedure GetKeys(const aIdentifier: OctetString; aProc : tGetKeyProc; aTag : Pointer = nil; aUnfiltered: Boolean = False); overload;
Callback overload: invokes aProc (a plain procedure, with aTag passed through) once per key filed under aIdentifier. Use it to process matches without building an intermediate list; aUnfiltered = True skips policy filtering.
» member page
procedure GetKeys(const aIdentifier: OctetString; aProc : tGetKeyMethod; aTag : Pointer = nil; aUnfiltered: Boolean = False); overload;
Callback overload taking a method pointer (aProc) instead of a plain procedure; otherwise identical to the tGetKeyProc version above. Use when the callback needs access to an object instance.
» member page
procedure GetKeys(const aIdentifier: OctetString; const aIID : TGUID; const aDataIID : TGUID; aList : IInterfaceList; aUnfiltered: Boolean = False); overload;
Interface-typed list overload: returns only those keys under aIdentifier that expose interface aIID (with associated data aDataIID), casting each to that interface. Use it to fetch, e.g., only the signing-capable or only the certificate view of the matching keys. SupportsIntf short-circuits indexes that can never hold the requested interface.
» member page
procedure GetKeys(const aIdentifier: OctetString; const aIID : TGUID; const aDataIID : TGUID; aProc : tGetKeyProc; aTag : Pointer = nil; aUnfiltered: Boolean = False); overload;
Interface-typed callback overload (plain procedure): as the interface-typed list overload, but delivers each aIID-conforming match to aProc.
» member page
procedure GetKeys(const aIdentifier: OctetString; const aIID : TGUID; const aDataIID : TGUID; aProc : tGetKeyMethod; aTag : Pointer = nil; aUnfiltered: Boolean = False); overload;
Interface-typed callback overload (method pointer): as above but the callback is a method, for use when it must reach an object instance.
» member page
function SetKey(const aKey: iUnknown): OctetString; override;
Adds aKey to this index (deriving its identifier) and writes the key bytes into the selected Stores, stopping at the first store that accepts it, returning the assigned identifier or an empty OctetString if it could not be added. This is how an app inserts a new key/certificate into a store through the index it is filed under.
» member page
function SupportsIntf(const aIID, aDataIID: TGUID): Boolean; virtual;
Fast pre-filter: returns True if this index could hold keys exposing aIID / aDataIID. The interface-typed GetKeys overloads call it to skip whole indexes that can never match, so descendant index classes override it to restrict themselves to relevant key types. The base class returns True.
» member page
procedure ValidateName(const aName: string); override;
Raises an error if aName clashes with another index already registered on the same key manager. Called internally when IndexName is assigned; apps normally set the name via the IndexName property rather than here.
» member page
property CacheKind;
Governs whether/how retrieved keys are cached (inherited). Leave at the default unless profiling shows repeated lookups warrant caching.
» member page
property Duplicates;
Selects how duplicate identifiers are handled when keys are added (dupError / dupIgnore / dupAccept, inherited). Pair dupIgnore with an OnIgnoreDuplicate handler to choose which duplicate wins.
» member page
property KeyManagerName;
Name of the TstKeyManager this index belongs to; wires the index to its manager (inherited). Set it so FindIndex and store/filter resolution work.
» member page
property IndexName: string read fIndexName write SetIndexName;
Unique name of this index within its key manager; used by TstKeyManager.FindIndex and by filters that reference indexes by name. Changing it re-registers the index (preserving the selected Stores).
» member page
property ReadOnly: Boolean read fReadOnly write SetReadOnly;
When True the index refuses to accept new keys (GetIdentifierForNewKey / AddKeyToIndex return empty unless aOverrideReadOnly is passed). Set it to expose an existing key set for lookup only, without letting keys be added.
» member page
property IndexFileName: TFileName read fIndexFileName write SetIndexFileName;
Optional file the index is persisted to/loaded from. When set and the index is enabled, contents are loaded from this file instead of being rebuilt by scanning the stores - use it to avoid re-indexing large stores on startup.
» member page
property LoadManually: Boolean read fLoadManually write SetLoadManually;
When True, enabling the index does NOT auto-populate it; you must load it yourself (LoadFromFile/LoadFromStream). Enabling a LoadManually index without first restoring it raises an error. Use it when you control index population explicitly.
» member page
property Stores: tDSIKeyStoreOptionList read fStores write SetStores;
The set of key stores (by StoreName) this index draws from; PopulateKeyList walks exactly these stores. Assign it to control which stores the index covers.
» member page
property OnIgnoreDuplicate: tIndexAddDuplicateEvent read fOnIgnoreDuplicate write SetOnIgnoreDuplicate;
Fired when a duplicate identifier is encountered while Duplicates = dupIgnore, letting the app decide which existing entry (by list index) the new key replaces, or reject it. Assign it to arbitrate duplicate keys.
» member page
property OnGenerateSignature;
Hook to supply a custom signature over the persisted index (inherited); assign it together with OnVerifySignature to authenticate the index file.
» member page
property OnVerifySignature;
Hook to verify the signature on a loaded index (inherited); pairs with OnGenerateSignature to detect tampering of the persisted index.
» member page
classTstAbstractKeyStorage
inherits from TstBaseKeyContainer
IMPORTANT: KeyStorages are supposed to identify keys using human readable strings, such as file paths, DB search criteria, etc. Hence, the GetIdentifierForNewKey MUST return an OctetString corresponding to the UTF-8 encoding of the human readable identifier.
function GetIdentifierForNewKey(const aKey: iUnknown): OctetString; virtual; abstract;
Abstract: a concrete store computes the internal identifier a new key would be filed under (its content-derived storage ID, distinct from the lookup identifiers that indexes hand out). Apps do not call this directly - it is the hook SetKey uses; override it when writing a new key-storage backend.
» member page
function SetKey(const aKey: iUnknown): OctetString; override;
Persists aKey into this store and returns its internal storage identifier. Call this to add a key to a specific store (via KeyManager.EnsureStore or a designed store component); it allocates the ID via GetIdentifierForNewKey, writes the key through the backend, and caches it. Raises if the key cannot be stored. The store is the write side; indexes give the read/lookup side.
» member page
procedure ValidateName(const aName: string); override;
Validates that aName is unique among the stores of the owning key manager, raising if another store already claims it. Invoked when StoreName is assigned (or the store is bound to a key manager); apps rarely call it.
» member page
function KeyIDExists(const aID: OctetString): Boolean;
Returns True if a key with the given internal storage identifier is already present in this (open) store. Use it to test for a key's presence by its storage ID before adding or fetching it; requires the store to be Enabled.
» member page
property KeyIDs[aIndex: Integer]: OctetString read GetKeyIDs;
Enumerates the internal storage identifiers of the keys currently held in this open store (index 0..KeyCount-1). Use it to iterate a store's contents, e.g. to list or migrate every stored key; requires the store to be Enabled.
» member page
property Duplicates;
Governs how the store reacts when a key mapping to an already-present storage ID is added: dupError raises, dupIgnore runs the ignore-duplicate handler, dupAccept lets the duplicate through. Set it at design time (or before opening the store) to pick the collision handling for this store.
» member page
property KeyManagerName;
Name of the TstKeyManager this store belongs to; assigning it (un)binds the store to that named manager, after which the manager can reach the store's keys. Set this to attach a runtime-created store to an existing key manager.
» member page
property StoreName: string read fStoreName write SetStoreName;
The name this store registers under inside its key manager. Indexes select which stores they cover by listing these names in their Stores property, and KeyManager.FindStore/EnsureStore look a store up by it; must be unique per key manager. Set it when configuring which stores an index should index.
» member page
inherits from TstCustomMPKey
constructor Create(AOwner: TComponent); override;
Standard component constructor. Registers this manager in the global manager list so it can later be found by KeyManagerName.
» member page
constructor CreateNoAdd;
Alternative constructor that creates the manager with no owner and does NOT register it in the global manager list. Used for the internal/global default manager and other short-lived, unregistered instances.
» member page
destructor Destroy; override;
Unregisters from the global manager list and tears down all attached stores, indexes and filters before destruction.
» member page
function FindIndex(const aName: string): TstAbstractKeyIndex;
Returns the attached index whose IndexName equals aName, or nil if none matches.
» member page
function FindIndexForStore(const aStoreName: string; aIndexClass: tKeyIndexClass): TstAbstractKeyIndex;
Returns the first attached index of class aIndexClass that lists aStoreName among its selected stores, or nil if none matches.
» member page
function FindStore(const aName: string): TstAbstractKeyStorage;
Returns the attached store whose StoreName equals aName, or nil if none matches.
» member page
function FindFilter(const aName: string): TstAbstractKeyFilter;
Returns the attached filter whose FilterName equals aName, or nil if none matches.
» member page
function EnsureStore(aClass: tKeyStorageClass; const aStoreName: string): TstAbstractKeyStorage;
Returns an existing store of class aClass named aStoreName if one is already attached, otherwise creates it (owned by this manager's Owner, auto-named, parented to this manager) and returns it. Used to build a key store setup at runtime without dropping components at design time.
» member page
function EnsureIndexForStores(aClass: tKeyIndexClass; const aStores: array of string): TstAbstractKeyIndex;
Returns an existing index of class aClass that covers exactly the named stores if one is already attached, otherwise creates and wires one up over those stores. Runtime counterpart to dropping an index component.
» member page
function EnsureFilterForIndicies(aClass: tKeyFilterClass; const aIndicies: array of string): TstAbstractKeyFilter;
Returns an existing filter of class aClass that covers exactly the named indexes if one is already attached, otherwise creates and wires one up over those indexes. Runtime counterpart to dropping a filter component.
» member page
function GetKey(const aIdentifier: OctetString): iUnknown; override;
Primary key lookup: returns the key registered under aIdentifier, but only if it passes the attached filters (both the identifier and the resolved key are checked); returns nil when filtered out or not found. An empty identifier returns the DefaultKey.
» member page
function GetUnfilteredKey(const aIdentifier: OctetString): iUnknown;
Like GetKey but bypasses the filters: returns the first key any index has for aIdentifier regardless of filter policy (an empty identifier still returns the DefaultKey). Use when you deliberately need an unfiltered lookup.
» member page
procedure GetAssociatedKeys(const aKey : iUnknown; aList : IInterfaceList; aUnfiltered: Boolean = False); overload;
Collects every key that any attached index associates with aKey (e.g. the matching public key for a private key, or a certificate for its key), and appends them to aList.
Full description »
procedure GetAssociatedKeys(const aKey : iUnknown; aProc : tGetKeyProc; aTag : Pointer = nil; aUnfiltered: Boolean = False); overload;
Callback form of GetAssociatedKeys: invokes aProc (with aTag) once per associated key found for aKey.
» member page
procedure GetAssociatedKeys(const aKey : iUnknown; aProc : tGetKeyMethod; aTag : Pointer = nil; aUnfiltered: Boolean = False); overload;
Method-callback form of GetAssociatedKeys: invokes the method aProc (with aTag) once per associated key found for aKey.
» member page
procedure GetAssociatedKeys(const aKey : iUnknown; const aIID : TGUID; const aDataIID : TGUID; aList : IInterfaceList; aUnfiltered: Boolean = False); overload;
GetAssociatedKeys restricted to keys that support the interface aIID (with key-data interface aDataIID); appends the matching associated keys of aKey to aList.
» member page
procedure GetAssociatedKeys(const aKey : iUnknown; const aIID : TGUID; const aDataIID : TGUID; aProc : tGetKeyProc; aTag : Pointer = nil; aUnfiltered: Boolean = False); overload;
Interface-filtered GetAssociatedKeys delivering results through the callback aProc (with aTag).
» member page
procedure GetAssociatedKeys(const aKey : iUnknown; const aIID : TGUID; const aDataIID : TGUID; aProc : tGetKeyMethod; aTag : Pointer = nil; aUnfiltered: Boolean = False); overload;
Interface-filtered GetAssociatedKeys delivering results through the method callback aProc (with aTag).
» member page
procedure GetKeys(const aIdentifier: OctetString; aList : IInterfaceList; aUnfiltered: Boolean = False); overload;
Collects every key that any attached index holds under aIdentifier and appends them to aList. An empty identifier yields the DefaultKey. Pass aUnfiltered = True to skip the filter policy. Unlike GetKey (which returns only the first match) this gathers all matches across all indexes.
» member page
procedure GetKeys(const aIdentifier: OctetString; aProc : tGetKeyProc; aTag : Pointer = nil; aUnfiltered: Boolean = False); overload;
Callback form of GetKeys: invokes aProc (with aTag) once per key found for aIdentifier.
» member page
procedure GetKeys(const aIdentifier: OctetString; aProc : tGetKeyMethod; aTag : Pointer = nil; aUnfiltered: Boolean = False); overload;
Method-callback form of GetKeys: invokes the method aProc (with aTag) once per key found for aIdentifier.
» member page
procedure GetKeys(const aIdentifier: OctetString; const aIID : TGUID; const aDataIID : TGUID; aList : IInterfaceList; aUnfiltered: Boolean = False); overload;
GetKeys restricted to keys that support the interface aIID (with key-data interface aDataIID); appends the matching keys held under aIdentifier to aList.
» member page
procedure GetKeys(const aIdentifier: OctetString; const aIID : TGUID; const aDataIID : TGUID; aProc : tGetKeyProc; aTag : Pointer = nil; aUnfiltered: Boolean = False); overload;
Interface-filtered GetKeys delivering results through the callback aProc (with aTag).
» member page
procedure GetKeys(const aIdentifier: OctetString; const aIID : TGUID; const aDataIID : TGUID; aProc : tGetKeyMethod; aTag : Pointer = nil; aUnfiltered: Boolean = False); overload;
Interface-filtered GetKeys delivering results through the method callback aProc (with aTag).
» member page
procedure GetCrossIndexKeys(const aIndexes : array of string; const aIdentifiers: array of OctetString; aList : IInterfaceList; aUnfiltered : Boolean = False); overload;
Intersects lookups across several named indexes: aIndexes and aIdentifiers are parallel arrays, one identifier per index.
Full description »
procedure GetCrossIndexKeys(const aIndexes : array of string; const aIdentifiers: array of OctetString; aProc : tGetKeyProc; aTag : Pointer = nil; aUnfiltered : Boolean = False); overload;
Callback form of GetCrossIndexKeys: invokes aProc (with aTag) once per key surviving the cross-index intersection.
» member page
procedure GetCrossIndexKeys(const aIndexes : array of string; const aIdentifiers: array of OctetString; aProc : tGetKeyMethod; aTag : Pointer = nil; aUnfiltered : Boolean = False); overload;
Method-callback form of GetCrossIndexKeys: invokes the method aProc (with aTag) once per key surviving the cross-index intersection.
» member page
procedure GetCrossIndexKeys(const aIndexes : array of string; const aIdentifiers: array of OctetString; const aIID : TGUID; const aDataIID : TGUID; aList : IInterfaceList; aUnfiltered : Boolean = False); overload;
GetCrossIndexKeys restricted to keys supporting the interface aIID (with key-data interface aDataIID); leaves the surviving keys in aList.
» member page
procedure GetCrossIndexKeys(const aIndexes : array of string; const aIdentifiers: array of OctetString; const aIID : TGUID; const aDataIID : TGUID; aProc : tGetKeyProc; aTag : Pointer = nil; aUnfiltered : Boolean = False); overload;
Interface-filtered GetCrossIndexKeys delivering results through the callback aProc (with aTag).
» member page
procedure GetCrossIndexKeys(const aIndexes : array of string; const aIdentifiers: array of OctetString; const aIID : TGUID; const aDataIID : TGUID; aProc : tGetKeyMethod; aTag : Pointer = nil; aUnfiltered : Boolean = False); overload;
Interface-filtered GetCrossIndexKeys delivering results through the method callback aProc (with aTag).
» member page
function IsIdentifierAllowed(const aIdentifier: OctetString): Boolean;
Runs aIdentifier past every attached filter and returns True only if all of them allow it. An empty identifier is always allowed. This is the identifier half of the filter policy that GetKey applies.
» member page
function IsKeyAllowed(const aIdentifier: OctetString; const aKey : iUnknown) : Boolean;
Runs the (identifier,key) pair past every attached filter and returns True only if all of them allow it. This is the resolved-key half of the filter policy that GetKey applies (e.g. chain / revocation validation of a certificate key).
» member page
procedure SetAbsolutePath(const aPath: string);
Sets the root directory that file-backed stores, indexes and filters use, normalising it to end with a path delimiter, and propagates it to every attached container. Call before opening a file-based key store.
» member page
procedure ForceDirectories;
Creates the on-disk directories for every attached store, index and filter under the current absolute path, so their files can be written.
» member page
procedure SaveAllSaveable;
Saves every attached store, index and filter that implements iSaveable and is Modified back to its file (creating directories as needed). Call to persist runtime changes to a file-backed key manager.
» member page
procedure OpenFirstTime(const aPath: string);
Initialises a brand-new file-backed key store at aPath: sets the absolute path, creates the directories, deletes any pre-existing index/filter files, then enables the manager so fresh files are created. Use once when setting up a store for the first time.
» member page
function LoadPublicKeyFromStream(const aIdentifier: OctetString; aStrm : TStream) : Boolean; override;
Verifies a public key read from aStrm against the key already stored under aIdentifier: parses the key via the CollectedStoreName store, compares it (by key buffer) to the keys the CollectedIndexName index holds for that identifier, and returns True on a match. Overrides the base verification hook; raises if the collected store/index names are not configured.
» member page
procedure SuggestRequiredUnits(aProc: tGetStringMethod); override;
Reports the units needed to compile-in the key formats and container classes this manager currently uses, by delegating to every attached store, index and filter. Used by design-time uses-clause maintenance, not normally by applications.
» member page
property DefaultKey: iUnknown read fDefaultKey write SetDefaultKey;
The key returned for an empty identifier. Set explicitly, or auto-populated from the first index that yields a key for the empty identifier when the manager is enabled; cleared when disabled.
» member page
property FilterCount: Integer read GetFilterCount;
Number of filters currently attached to this manager.
» member page
property Filters[aIndex: Integer]: TstAbstractKeyFilter read GetFilters;
Indexed access to the attached filters, 0..FilterCount-1.
» member page
property IndexCount: Integer read GetIndexCount;
Number of indexes currently attached to this manager.
» member page
property Indexes[aIndex: Integer]: TstAbstractKeyIndex read GetIndexes;
Indexed access to the attached indexes, 0..IndexCount-1.
» member page
property StorageCount: Integer read GetStorageCount;
Number of stores currently attached to this manager.
» member page
property Storages[aIndex: Integer]: TstAbstractKeyStorage read GetStorages;
Indexed access to the attached stores, 0..StorageCount-1.
» member page
property Enabled;
When set True, opens the manager: enables all attached stores and indexes (loading their data), captures a DefaultKey, then enables the filters; set False to close everything and drop the DefaultKey. Has no effect until at least one index is attached.
» member page
property EnabledDesignTime;
Controls whether Enabled is honoured at design time (inherited).
» member page
property EnabledRunTime;
Controls whether Enabled is honoured at run time (inherited).
» member page
property KeyManagerName: string read fKeyManagerName write SetKeyManagerName;
Unique name for this manager; other components locate it by this name via the global manager list. Must be unique - assigning a name already in use raises. Cannot be changed while the manager is enabled.
» member page
property CollectedStoreName: string read fCollectedStoreName write SetCollectedStoreName;
Name of the store used by LoadPublicKeyFromStream to parse an incoming key (the store where collected/imported keys are decoded).
» member page
property CollectedIndexName: string read fCollectedIndexName write SetCollectedIndexName;
Name of the index used by LoadPublicKeyFromStream to look up the stored key to compare an incoming key against.
» member page
property OnGenerateSignature: tIndexGenerateSignEvent read fOnGenerateSignature write SetOnGenerateSignature;
Optional hook giving the application a chance to sign an index's persisted digest; invoked by DoGenerateSignature when saving indexes.
» member page
property OnVerifySignature: tIndexVerifySignEvent read fOnVerifySignature write SetOnVerifySignature;
Optional hook letting the application verify the signature over an index's persisted digest when loading; invoked by DoVerifySignature.
» member page
classtKeyManagerList
inherits from TObject
constructor Create;
destructor Destroy; override;
function FindKeyManager(const aKeyManagerName: string): TstKeyManager;
procedure GetKeyManagerNames(aList: TStrings);
function OpenKeyManager(const aKeyManagerName: string): TstKeyManager;
property Count: Integer read GetCount;
property KeyManagers[aIndex: Integer]: TstKeyManager read GetKeyManager; default;
property List[const aKeyManagerName: string]: TstKeyManager read GetKeyManagerByName;
inherits from TstAbstractKeyStorage
constructor Create(AOwner: TComponent); override;
Sets up the internal key-format registries; apps do not call this directly, it runs when the store component is constructed.
» member page
destructor Destroy; override;
Frees the internal format registries. Called automatically; apps do not invoke it directly.
» member page
function GetIdentifierForNewKey(const aKey: iUnknown) : OctetString; override;
Serializes aKey through the first enabled format that accepts it and returns the store identifier (format name; index; id-value) under which the key is saved. Called by the key-manager machinery when a new key is added to this store; an application rarely calls it directly. The result encodes whether the format bundles multiple keys under one id-value.
» member page
class procedure ListIdentifyingKeyFormats(aFormats: tCustomDSIKeyFormatList; aList : TStrings); overload;
Enumerates, into aList, the format names in aFormats that are suitable as an "identifying" (deterministic, single-key) format - i.e. the candidates a designer can pick for the IdentifyingPublicKeyFormat*/IdentifyingPrivateKeyFormat* properties. Primarily used by the design-time property editor.
» member page
procedure ListIdentifyingKeyFormats(const aPropName: string; aList: TStrings); overload;
Same as above, but selects the relevant format list from the published property named aPropName (e.g. 'IdentifyingPublicKeyFormatDL'). The property editor calls this to populate the drop-down of allowed identifying formats.
» member page
procedure SuggestRequiredUnits(aProc: tGetStringMethod); override;
Reports (via aProc) the units that must appear in a project's uses clause for every enabled key format, so a generated/streamed setup compiles. Design-time tooling collects these; an application rarely calls it directly.
» member page
property CacheKind;
Governs whether/how retrieved keys are cached (inherited). Leave at the default unless profiling shows repeated lookups on this store warrant it.
» member page
property PrivateKeyPassword;
Password used to encrypt/decrypt private keys held in this store for password-based formats; set it when the store's keys are password-protected and you do not want to prompt via OnPassword.
» member page
property OnPassword;
Fired when a password is needed to unlock a stored private key; handle it to prompt the user or supply a credential instead of setting PrivateKeyPassword up front.
» member page
property PublicKeyFormatDL: tDSIDLPublicKeyFormatList read fPublicKeyFormatDL write SetPublicKeyFormatDL;
Enabled DL (discrete-log: DSA/DH/ECDSA/ECDH/EdDSA) public-key serialization formats this store will try. Enable the formats you need so that public keys of that family can be stored and read back; also feeds the candidate list for IdentifyingPublicKeyFormatDL.
» member page
property PublicKeyFormatIF: tDSIIFPublicKeyFormatList read fPublicKeyFormatIF write SetPublicKeyFormatIF;
Enabled IF (integer-factorization: RSA) public-key serialization formats this store will try. Enable to allow RSA public keys to be stored/loaded here.
» member page
property PublicKeyFormatMLDSA: tDSIMLDSAPublicKeyFormatList read fPublicKeyFormatMLDSA write SetPublicKeyFormatMLDSA;
Enabled ML-DSA (FIPS 204 lattice signature) public-key serialization formats. Enable when this store must hold post-quantum ML-DSA public keys.
» member page
property PublicKeyFormatMLKEM: tDSIMLKEMPublicKeyFormatList read fPublicKeyFormatMLKEM write SetPublicKeyFormatMLKEM;
Enabled ML-KEM (FIPS 203 lattice KEM) public-key serialization formats. Enable when this store must hold post-quantum ML-KEM public keys.
» member page
property PublicKeyFormatCompositeMLDSA: tDSICompositeMLDSAPublicKeyFormatList read fPublicKeyFormatCompositeMLDSA write SetPublicKeyFormatCompositeMLDSA;
Enabled composite ML-DSA (PQ + classical hybrid signature) public-key formats. Enable when the store must hold composite ML-DSA public keys.
» member page
property PublicKeyFormatCompositeMLKEM: tDSICompositeMLKEMPublicKeyFormatList read fPublicKeyFormatCompositeMLKEM write SetPublicKeyFormatCompositeMLKEM;
Enabled composite ML-KEM (PQ + classical hybrid KEM) public-key formats. Enable when the store must hold composite ML-KEM public keys.
» member page
property PublicKeyFormatSLHDSA: tDSISLHDSAPublicKeyFormatList read fPublicKeyFormatSLHDSA write SetPublicKeyFormatSLHDSA;
Enabled SLH-DSA (FIPS 205 hash-based signature) public-key formats. Enable when the store must hold post-quantum SLH-DSA public keys.
» member page
property PrivateKeyFormatDL: tDSIDLPrivateKeyFormatList read fPrivateKeyFormatDL write SetPrivateKeyFormatDL;
Enabled DL (DSA/DH/ECDSA/ECDH/EdDSA) private-key serialization formats this store will try. Enable the formats you need so private keys of that family can be stored and read back; also feeds IdentifyingPrivateKeyFormatDL.
» member page
property PrivateKeyFormatIF: tDSIIFPrivateKeyFormatList read fPrivateKeyFormatIF write SetPrivateKeyFormatIF;
Enabled IF (RSA) private-key serialization formats. Enable to allow RSA private keys to be stored/loaded here.
» member page
property PrivateKeyFormatMLDSA: tDSIMLDSAPrivateKeyFormatList read fPrivateKeyFormatMLDSA write SetPrivateKeyFormatMLDSA;
Enabled ML-DSA private-key serialization formats. Enable when this store must hold post-quantum ML-DSA private keys.
» member page
property PrivateKeyFormatMLKEM: tDSIMLKEMPrivateKeyFormatList read fPrivateKeyFormatMLKEM write SetPrivateKeyFormatMLKEM;
Enabled ML-KEM private-key serialization formats. Enable when this store must hold post-quantum ML-KEM private keys.
» member page
property PrivateKeyFormatCompositeMLDSA: tDSICompositeMLDSAPrivateKeyFormatList read fPrivateKeyFormatCompositeMLDSA write SetPrivateKeyFormatCompositeMLDSA;
Enabled composite ML-DSA private-key formats. Enable when the store must hold composite ML-DSA private keys.
» member page
property PrivateKeyFormatCompositeMLKEM: tDSICompositeMLKEMPrivateKeyFormatList read fPrivateKeyFormatCompositeMLKEM write SetPrivateKeyFormatCompositeMLKEM;
Enabled composite ML-KEM private-key formats. Enable when the store must hold composite ML-KEM private keys.
» member page
property PrivateKeyFormatSLHDSA: tDSISLHDSAPrivateKeyFormatList read fPrivateKeyFormatSLHDSA write SetPrivateKeyFormatSLHDSA;
Enabled SLH-DSA private-key formats. Enable when the store must hold post-quantum SLH-DSA private keys.
» member page
property IdentifyingPublicKeyFormatDL: string read GetIdentifyingPublicKeyFormatDL write SetIdentifyingPublicKeyFormatDL stored StoredIPrivKFDL;
Name of the single DL public-key format used to compute a canonical, stable identifier (fingerprint) for a key - the format used when the key must be matched or indexed deterministically. Assigning it validates that the named format is enabled in PublicKeyFormatDL; if left blank the getter derives a suitable deterministic format automatically.
» member page
property IdentifyingPublicKeyFormatIF: string read GetIdentifyingPublicKeyFormatIF write SetIdentifyingPublicKeyFormatIF stored StoredIPrivKFIF;
The IF (RSA) public-key format used to compute a key's canonical identifier; see IdentifyingPublicKeyFormatDL. Auto-derived when blank.
» member page
property IdentifyingPublicKeyFormatMLDSA: string read GetIdentifyingPublicKeyFormatMLDSA write SetIdentifyingPublicKeyFormatMLDSA stored StoredIPrivKFMLDSA;
The ML-DSA public-key format used to compute a key's canonical identifier; see IdentifyingPublicKeyFormatDL. Auto-derived when blank.
» member page
property IdentifyingPublicKeyFormatMLKEM: string read GetIdentifyingPublicKeyFormatMLKEM write SetIdentifyingPublicKeyFormatMLKEM stored StoredIPrivKFMLKEM;
The ML-KEM public-key format used to compute a key's canonical identifier; see IdentifyingPublicKeyFormatDL. Auto-derived when blank.
» member page
property IdentifyingPublicKeyFormatCompositeMLDSA: string read GetIdentifyingPublicKeyFormatCompositeMLDSA write SetIdentifyingPublicKeyFormatCompositeMLDSA stored StoredIPrivKFCompositeMLDSA;
The composite ML-DSA public-key format used to compute a key's canonical identifier; see IdentifyingPublicKeyFormatDL. Auto-derived when blank.
» member page
property IdentifyingPublicKeyFormatCompositeMLKEM: string read GetIdentifyingPublicKeyFormatCompositeMLKEM write SetIdentifyingPublicKeyFormatCompositeMLKEM stored StoredIPrivKFCompositeMLKEM;
The composite ML-KEM public-key format used to compute a key's canonical identifier; see IdentifyingPublicKeyFormatDL. Auto-derived when blank.
» member page
property IdentifyingPublicKeyFormatSLHDSA: string read GetIdentifyingPublicKeyFormatSLHDSA write SetIdentifyingPublicKeyFormatSLHDSA stored StoredIPrivKFSLHDSA;
The SLH-DSA public-key format used to compute a key's canonical identifier; see IdentifyingPublicKeyFormatDL. Auto-derived when blank.
» member page
property IdentifyingPrivateKeyFormatDL: string read GetIdentifyingPrivateKeyFormatDL write SetIdentifyingPrivateKeyFormatDL stored StoredIPublKFDL;
The DL private-key format used to compute a canonical identifier for a private key (used by GetKeyBufFromKey when routing a private key to its identifying serialization); see IdentifyingPublicKeyFormatDL. Auto-derived when blank.
» member page
property IdentifyingPrivateKeyFormatIF: string read GetIdentifyingPrivateKeyFormatIF write SetIdentifyingPrivateKeyFormatIF stored StoredIPublKFIF;
The IF (RSA) private-key format used to compute a private key's canonical identifier; see IdentifyingPrivateKeyFormatDL. Auto-derived when blank.
» member page
property IdentifyingPrivateKeyFormatMLDSA: string read GetIdentifyingPrivateKeyFormatMLDSA write SetIdentifyingPrivateKeyFormatMLDSA stored StoredIPublKFMLDSA;
The ML-DSA private-key format used to compute a private key's canonical identifier; see IdentifyingPrivateKeyFormatDL. Auto-derived when blank.
» member page
property IdentifyingPrivateKeyFormatMLKEM: string read GetIdentifyingPrivateKeyFormatMLKEM write SetIdentifyingPrivateKeyFormatMLKEM stored StoredIPublKFMLKEM;
The ML-KEM private-key format used to compute a private key's canonical identifier; see IdentifyingPrivateKeyFormatDL. Auto-derived when blank.
» member page
property IdentifyingPrivateKeyFormatCompositeMLDSA: string read GetIdentifyingPrivateKeyFormatCompositeMLDSA write SetIdentifyingPrivateKeyFormatCompositeMLDSA stored StoredIPublKFCompositeMLDSA;
The composite ML-DSA private-key format used to compute a private key's canonical identifier; see IdentifyingPrivateKeyFormatDL. Auto-derived when blank.
» member page
property IdentifyingPrivateKeyFormatCompositeMLKEM: string read GetIdentifyingPrivateKeyFormatCompositeMLKEM write SetIdentifyingPrivateKeyFormatCompositeMLKEM stored StoredIPublKFCompositeMLKEM;
The composite ML-KEM private-key format used to compute a private key's canonical identifier; see IdentifyingPrivateKeyFormatDL. Auto-derived when blank.
» member page
property IdentifyingPrivateKeyFormatSLHDSA: string read GetIdentifyingPrivateKeyFormatSLHDSA write SetIdentifyingPrivateKeyFormatSLHDSA stored StoredIPublKFSLHDSA;
The SLH-DSA private-key format used to compute a private key's canonical identifier; see IdentifyingPrivateKeyFormatDL. Auto-derived when blank.
» member page
property OnSuggestIdentifyingKeyFormat: tGetKeyFormatIntfEvent read fOnSuggestIdentifyingKeyFormat write SetOnSuggestIdentifyingKeyFormat;
Hook to override, per key, which format is used as the identifying serialization. After the store picks a default identifying format for a key, this event fires so the handler can substitute a different iCustomDSIKeyFormat; the substitute must support iCustomDSIKeyFormat or an error is raised. Use it when the fixed IdentifyingXxxKeyFormat properties are not selective enough.
» member page
classTstCustomKeyIndexDigest
inherits from TstAbstractKeyIndex
constructor Create(AOwner: TComponent); override;
Sets the default DigestAlgorithm to haSHA1 (or haNull if the SHA-1 hash class is not linked in). Applications normally drop a TstKeyIndexDigest on a key manager rather than constructing this base class directly.
» member page
class function Unequivocal: Boolean; override;
Returns True: this index derives one identifier per key (the digest of the key's serialized buffer), so GetKey stops at the first hashed hit.
» member page
class function Unique: Boolean; override;
Returns False: a single identifier may select more than one key here (both halves of a key pair hash to it, and distinct keys could collide), so an identifier is not guaranteed to be unique.
» member page
class function KeyPair: Boolean; override;
Returns True: the public and private halves of a key pair serialize to the same buffer for digest purposes, so both are found under one identifier.
» member page
procedure SuggestRequiredUnits(aProc: tGetStringMethod); override;
Reports the unit that implements the selected DigestAlgorithm (via SuggestRequiredUnit) in addition to the units suggested by the inherited index, so the IDE can add it to the uses clause.
» member page
property DigestAlgorithm: tHashAlgorithm read fDigestAlgorithm write SetDigestAlgorithm;
Hash algorithm applied to a key's serialized buffer to produce its index identifier (a fingerprint). Defaults to haSHA1. Set to haNull to index on the raw key buffer with no hashing. Changing it re-resolves the hash class (MustFindHashClass), so the chosen algorithm must be linked in.
» member page
inherits from TstCustomKeyIndexDigest
(no public members)
classtKeyIndexDigest
inherits from TstCustomKeyIndexDigest
class function Description: string; override;
Returns the value of rsUseKeyIndexDigestF.
Types (enumerations, sets, aliases)
enumtKeyIndexCacheKind
tKeyIndexCacheKind = (kicNever,kicWhenUsed,kicStartup);
proctIndexAddDuplicateEvent
tIndexAddDuplicateEvent = procedure(Sender : TObject;
const aIdentifier: OctetString;
const aCurrentKey: iUnknown;
const aNewKey : iUnknown;
var aReplace : Boolean) of object;
proctIndexGenerateSignEvent
tIndexGenerateSignEvent = procedure(Sender : TObject;
const aDigestBase64 : AnsiString;
var aSignBase64 : AnsiString) of object;
proctIndexVerifySignEvent
tIndexVerifySignEvent = procedure(Sender : TObject;
const aDigestBase64 : AnsiString;
const aSignBase64 : AnsiString;
var aOK : Boolean) of object;
proctGetKeyProc
tGetKeyProc = procedure (const aKey: iUnknown; aTag: Pointer);
proctGetKeyMethod
tGetKeyMethod = procedure (const aKey: iUnknown; aTag: Pointer) of object;
tKeyInputCategory = (kicUnknown,
kicMy,
kicRoot,
kicTrusted,
kicIssued,
kicCollected,
kicReadOnly);
typetKeyFilterClass
tKeyFilterClass = class of TstAbstractKeyFilter;
typetKeyIndexClass
tKeyIndexClass = class of TstAbstractKeyIndex;
typetKeyStorageClass
tKeyStorageClass = class of TstAbstractKeyStorage;
tGetKeyFormatIntfEvent = procedure (Sender : TObject;
const aKey : iUnknown;
var aFormat: iUnknown) of object;
Routines