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
| CertContext | Windows CERT_CONTEXT handle, the same pointer the sign process holds |
|---|
Return values
| 0 | PL_MODERN_KEY_UNKNOWN, the public key algorithm could not be classified |
|---|---|
| 1 | PL_MODERN_KEY_RSA |
| 2 | PL_MODERN_KEY_EC |
| 3 | PL_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