API Reference
StreamSec.DSI.PkixKeyStoragePkcs11
PkixKeyStoragePkcs11 Unit - PKCS#11 token certificate and key storage
Feature notes: PKIX / CMS implementation notes
Classes, interfaces and records
classTstCustomKeyStoragePkcs11
inherits from TstAbstractKeyStorage
constructor Create(AOwner: TComponent); override;
CacheKind is kicStartup for the same reason as the WinCert store: the decoded certificate and the bound private-key object are captured during enumeration and kept, because a bucket cannot be refilled later without an open session and a fresh login.
» member page
destructor Destroy; override;
function GetIdentifierForNewKey(const aKey: IInterface): OctetString; override;
property Token: tPkcs11Token read fToken;
The live token while the store is populated, for callers that want to ask what it can do (see tPkcs11Token.CapabilityReport). nil when the store has not been opened.
» member page
property ModulePath: string read fModulePath write SetModulePath;
Path to the Cryptoki module: eTPKCS11.dll on Windows, libeToken.so on Linux for the SafeNet middleware. A bare filename is resolved by the platform loader's own search path.
» member page
property TokenSerial: string read fTokenSerial write SetTokenSerial;
Serial number or label of the token to use. Empty takes the first token present, which is only safe when exactly one is ever plugged in.
» member page
property Passphrase: string read fPassphrase write fPassphrase;
Set only for unattended use. Prefer OnGetPassphrase, which keeps the credential out of the DFM and out of the component's published state. Whatever the device calls it -- PIN, token password, passphrase -- it is the one CKU_USER credential, and the token's declared length limit applies to its UTF-8 BYTE length (see tPkcs11Token.MaxPinLen).
» member page
property OnGetPassphrase: tPkcs11GetPassphraseEvent read fOnGetPassphrase write fOnGetPassphrase;
inherits from TstCustomKeyStoragePkcs11
(no public members)
classtKeyStoragePkcs11
inherits from TstCustomKeyStoragePkcs11
class function Description: string; override;
Types (enumerations, sets, aliases)
proctPkcs11GetPassphraseEvent
Fired when the store needs the token credential. Set aCancel to leave the store empty rather than attempt a login. There is no retry: a wrong credential decrements a counter that eventually locks the device.
tPkcs11GetPassphraseEvent = procedure(Sender : TObject;
var aPassphrase : string;
var aCancel : Boolean) of object;