PLModernCertificateDERKeyAlgorithm
Cryptography, digital signatures
Description
Reports the key algorithm family of a DER-encoded certificate as one of the PL_MODERN_KEY_* constants, on every platform
Syntax
Delphi
Function PLModernCertificateDERKeyAlgorithm(Const CertificateDER: AnsiString): Integer;Parameters
| CertificateDER | DER-encoded X.509 certificate bytes, the same material the sign process attaches |
|---|
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 |
| 4 | PL_MODERN_KEY_ED448 |
| 5 | PL_MODERN_KEY_MLDSA |
| 6 | PL_MODERN_KEY_SM2 |
| 7 | PL_MODERN_KEY_RSA_PSS, an RSASSA-PSS public key; reported only by this DER form |
Remarks
The Windows certificate-context counterpart is PLModernCertificateKeyAlgorithm; this DER form runs on every platform and additionally distinguishes RSASSA-PSS keys, which matter for pure-Pascal signing routes
The classification decides which detached-CMS path PLBuildModernDetachedCMS takes and which identity openers accept the certificate
See also
PLModernCertificateKeyAlgorithm, PLBuildModernDetachedCMS, PLCertificatePublicKeyInfo