SetSignProcessSM2IdentityFromFileA
Security and signatures
Description
The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to SetSignProcessSM2IdentityFromFile and string arguments are interpreted using the current SetAnsiMode code page
Attaches an SM2 certificate and private scalar loaded from files to a signature process
Syntax
Delphi
Function DLSetSignProcessSM2IdentityFromFileA(InstanceID, SignProcessID: Integer; CertificateFile, PrivateKeyFile: PAnsiChar): Integer;
DLL
int DLSetSignProcessSM2IdentityFromFileA(int InstanceID, int SignProcessID, const char* CertificateFile, const char* PrivateKeyFile);
Parameters
| SignProcessID | Signature process handle returned by NewSignProcessFrom* |
|---|---|
| CertificateFile | Path of the DER certificate holding the SM2 public point |
| PrivateKeyFile | Path of the raw 32-byte scalar or an unencrypted PKCS #8 / SEC1 DER wrapping |
Return values
1 when the files were read and the identity was accepted, or 0 when either file is missing, unreadable or fails validation
Remarks
Behaves exactly like SetSignProcessSM2Identity after slurping both files