methodTstCustomKeyStorageFiles.SaveKeyToFile
function SaveKeyToFile(const aFileName: string; const aKey : iUnknown) : Boolean; virtual;
Writes a single key (any iUnknown key interface: private key, public key/certificate, or an iMPKeyList compound) to aFileName, choosing the on-disk key format automatically. An app calls this to export a key it holds -- e.g. a generated key pair or an imported certificate -- to a stand-alone file (.pvk/.cer/.pfx/.p7c) without first registering it as a managed key. If aFileName has no drive it is resolved under Directory. When the target file does not yet exist, the format is picked from the OnSuggestFileKeyFormat handler if assigned, otherwise from the store's enabled formats; any needed password comes from PrivateKeyPassword / OnPassword. If the file already exists, the key is appended to a multi-key file (or a duplicate is silently ignored) but a differing single-key file raises an error rather than being overwritten. Returns True only when a new key was actually written. Not client/server specific -- it is generic key-file export.