SetPublicKeyDecryptionStore
安全和签名
描述
设置后续文档加载期间用于搜索匹配收件人私钥的 Windows 证书存储区
当过滤器命名不同收件人时,存储中必须为每个加密过滤器包含匹配的私钥
若某过滤器没有匹配的私钥,即使存在匹配的证书,文档加载和 Direct Access 都会失败并置 LastErrorCode 421
当一个过滤器内多个私钥匹配收件人信封时,该过滤器使用所有匹配信封共享的权限
语法
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);
参数
| StoreName | Windows 证书存储区名称,例如 MY |
|---|---|
| UseMachineStore | 本地计算机存储使用非零值,当前用户存储使用零 |
返回值
| 1 | 已保留存储选择 |
|---|---|
| 0 | 存储名称为空 |
备注
DLL 还为 ANSI 字符串导出 DLSetPublicKeyDecryptionStoreA
另请参阅
SetPublicKeyDecryptionPFX、ClearPublicKeyDecryptionCredential