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

CertificateDERDER-encoded X.509 certificate bytes, the same material the sign process attaches

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
4PL_MODERN_KEY_ED448
5PL_MODERN_KEY_MLDSA
6PL_MODERN_KEY_SM2
7PL_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