CreateSelfSignedCertificateExA
보안 및 서명
설명
끝의 A는 ANSI(char) DLL 진입점을 나타내며 ActiveX/COM 표면은 Unicode 형식만 노출합니다. 동작은 CreateSelfSignedCertificateEx 함수와 동일하며 문자열 인수는 현재 SetAnsiMode 코드 페이지를 사용하여 해석됩니다
선택 가능한 키 알고리즘으로 자체 서명 인증서를 만들고 개인 키를 포함해 암호로 보호되는 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 DLCreateSelfSignedCertificateExA(InstanceID: Integer; SubjectName, PFXFileName, PFXPassword: PAnsiChar; ValidDays, KeyBits, KeyKind: Integer): Integer;
DLL
int DLCreateSelfSignedCertificateExA(int InstanceID, const char* SubjectName, const char* PFXFileName, const char* PFXPassword, int ValidDays, int KeyBits, int KeyKind);
매개변수
| SubjectName | 주체; = 문자가 없으면 CN= 접두사가 붙습니다 |
|---|---|
| PFXFileName | 기록할 PFX 파일 |
| PFXPassword | PFX 암호 |
| ValidDays | 유효 기간(일), 최소 1; 1 미만 값은 365가 됩니다 |
| KeyBits | KeyKind 0에서 RSA 비트 길이; KeyKind 1에서 곡선 선택자 256/384/521, 다른 값은 P-256을 선택합니다 |
| KeyKind | 0 = RSA, 1 = ECDSA |
반환 값
| 1 | 인증서와 PFX가 기록되었습니다 |
|---|---|
| 0 | 생성 또는 내보내기 실패; Windows 외 플랫폼에서는 ECDSA 생성을 쓸 수 없습니다 |