CreateSelfSignedCertificateEx

보안 및 서명

설명

선택 가능한 키 알고리즘으로 자체 서명 인증서를 만들고 개인 키를 포함해 암호로 보호되는 PFX 파일로 내보냅니다

KeyKind 0은 CreateSelfSignedCertificate의 기존 RSA 경로를 유지합니다; KeyKind 1은 CNG Microsoft Software Key Storage Provider로 ECDSA 키를 만들고 KeyBits 256/384/521을 P-256/P-384/P-521 곡선에 매핑하며 인증서를 ecdsa-with-SHA256으로 서명합니다

ECDSA 키는 내보내기 후 삭제되는 일회용 CNG 컨테이너에 살고 있습니다; 키 재료는 PFX 파일에만 남습니다

구문

Delphi

Function TPDFlib.CreateSelfSignedCertificateEx(Const SubjectName, PFXFileName, PFXPassword: WideString; ValidDays, KeyBits, KeyKind: Integer): Integer;

ActiveX

Function PDFlib::CreateSelfSignedCertificateEx(SubjectName As String, PFXFileName As String, PFXPassword As String, ValidDays As Long, KeyBits As Long, KeyKind As Long) As Long

DLL

int DLCreateSelfSignedCertificateEx(int InstanceID, const wchar_t* SubjectName, const wchar_t* PFXFileName, const wchar_t* PFXPassword, int ValidDays, int KeyBits, int KeyKind);
int DLCreateSelfSignedCertificateExA(int InstanceID, const char* SubjectName, const char* PFXFileName, const char* PFXPassword, int ValidDays, int KeyBits, int KeyKind);

매개변수

SubjectName주체; = 문자가 없으면 CN= 접두사가 붙습니다
PFXFileName기록할 PFX 파일
PFXPasswordPFX 암호
ValidDays유효 기간(일), 최소 1; 1 미만 값은 365가 됩니다
KeyBitsKeyKind 0에서 RSA 비트 길이; KeyKind 1에서 곡선 선택자 256/384/521, 다른 값은 P-256을 선택합니다
KeyKind0 = RSA, 1 = ECDSA

반환 값

1인증서와 PFX가 기록되었습니다
0생성 또는 내보내기 실패; Windows 외 플랫폼에서는 ECDSA 생성을 쓸 수 없습니다

참고 항목

CreateSelfSignedCertificate, SetSignProcessPFXFromFile