PLModernCertificateKeyAlgorithm

Cryptography, digital signatures

Description

Reports the key algorithm family of a Windows certificate context as one of the PL_MODERN_KEY_* constants

Syntax

Delphi

Function PLModernCertificateKeyAlgorithm(CertContext: Pointer): Integer;

Parameters

CertContextWindows CERT_CONTEXT handle, the same pointer the sign process holds

Return values

0PL_MODERN_KEY_UNKNOWN, the public key algorithm could not be classified
1PL_MODERN_KEY_RSA
2PL_MODERN_KEY_EC
3PL_MODERN_KEY_ED25519

Remarks

The classification decides which detached-CMS path PLBuildModernDetachedCMS takes: CNG NCrypt signing for RSA and EC, pure-Pascal Ed25519 for the eIDAS-friendly curve

See also

PLBuildModernDetachedCMS, PLCertificateSubjectAndIssuer, PLModernSignatureSizeEstimate