SetPublicKeyDecryptionStore
Security and signatures
Description
Sets the Windows certificate store searched for a matching recipient private key during subsequent document loads
The store must contain a matching private key for each encrypted filter when the filters name different recipients
If a filter has no matching private key, both document loading and Direct Access fail with LastErrorCode 421, even when the matching certificate is present
When multiple private keys match recipient envelopes within one filter, that filter uses the permissions shared by all matching envelopes
Syntax
Delphi
Function TPDFlib.SetPublicKeyDecryptionStore(Const StoreName: WideString; UseMachineStore: Integer): Integer;
ActiveX
Function PDFlib::SetPublicKeyDecryptionStore(StoreName As String, UseMachineStore As Long) As Long
DLL
int DLSetPublicKeyDecryptionStore(int InstanceID, const wchar_t* StoreName, int UseMachineStore);
int DLSetPublicKeyDecryptionStoreA(int InstanceID, const char* StoreName, int UseMachineStore);
Parameters
| StoreName | Windows certificate store name such as MY |
|---|---|
| UseMachineStore | Use a nonzero value for the local-machine store or zero for the current-user store |
Return values
| 1 | The store selection was retained |
|---|---|
| 0 | The store name was empty |
Remarks
The DLL also exports DLSetPublicKeyDecryptionStoreA for ANSI strings
See also
SetPublicKeyDecryptionPFX, ClearPublicKeyDecryptionCredential