SetSignProcessSM2IdentityFromFile

Security and signatures

Description

Attaches an SM2 certificate and private scalar loaded from files to a signature process

Syntax

Delphi

Function SetSignProcessSM2IdentityFromFile(SignProcessID: Integer; Const CertificateFile, PrivateKeyFile: WideString): Integer;

ActiveX

Function PDFlib::SetSignProcessSM2IdentityFromFile(SignProcessID As Long, CertificateFile As String, PrivateKeyFile As String) As Long

DLL

int DLSetSignProcessSM2IdentityFromFile(int InstanceID, int SignProcessID, const wchar_t* CertificateFile, const wchar_t* PrivateKeyFile);
int DLSetSignProcessSM2IdentityFromFileA(int InstanceID, int SignProcessID, const char* CertificateFile, const char* PrivateKeyFile);

Parameters

SignProcessIDSignature process handle returned by NewSignProcessFrom*
CertificateFilePath of the DER certificate holding the SM2 public point
PrivateKeyFilePath 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

See also

SetSignProcessSM2Identity, SetSignProcessDigestAlgorithm