SetSignProcessCNGKeyFromFile
보안 및 서명
설명
파일에서 DER 인코딩 X.509 인증서를 로드하고 이름이 지정된 NCrypt 개인 키를 PDF 서명 프로세스에 연결합니다
구문
Delphi
Function TPDFlib.SetSignProcessCNGKeyFromFile(SignProcessID: Integer; Const CertificateFile, ProviderName, KeyName: WideString; UseMachineKey, AllowUI: Boolean): Integer;
ActiveX
Function PDFlib::SetSignProcessCNGKeyFromFile(SignProcessID As Long, CertificateFile As String, ProviderName As String, KeyName As String, UseMachineKey As Long, AllowUI As Long) As Long
DLL
int DLSetSignProcessCNGKeyFromFile(int InstanceID, int SignProcessID, const wchar_t* CertificateFile, const wchar_t* ProviderName, const wchar_t* KeyName, int UseMachineKey, int AllowUI);
매개변수
| CertificateFile | DER로 인코딩된 RSA 또는 ECDSA X.509 인증서 경로 |
|---|---|
| ProviderName | Windows 키 스토리지 공급자 이름이며 빈 문자열이면 Microsoft 소프트웨어 공급자를 사용합니다 |
| KeyName | 공급자가 인식하는 영구 키 이름 |
| UseMachineKey | 컴퓨터 키 범위를 사용하려면 True 또는 0이 아닌 값 |
| AllowUI | 공급자 상호 작용을 허용하려면 True 또는 0이 아닌 값 |
반환 값
| 1 | 인증서를 읽고 구성을 연결했습니다 |
|---|---|
| 0 | 파일, 프로세스 ID 또는 키 이름이 유효하지 않습니다 |
비고
DLL은 ANSI 경로 및 이름용 DLSetSignProcessCNGKeyFromFileA도 내보냅니다
인증서 바이트는 서명 프로세스가 유지하고 개인 키는 공급자 안에 남습니다