Skip to content

Commit 0d80b30

Browse files
committed
Add post-quantum and EdDSA CRL signing via wc_SignCRL_ex2
CRL signature verification already supported post-quantum algorithms through the shared ConfirmSignature() engine, but CRL generation did not: wc_SignCRL_ex accepted only RSA and ECC keys and sized its signature buffer for a classic signature. Add wc_SignCRL_ex2, which takes an untyped key plus a keyType selector, the same scheme wc_MakeCert_ex and wc_SignCert_ex use. It resolves the key and reuses the existing CheckSigTypeForKey, GetSignatureBufferSz and MakeSignature helpers, so the signature buffer is sized from the key and post-quantum signatures get enough room. wc_SignCRL_ex keeps its original RSA/ECC signature and becomes a thin wrapper, preserving the public API. This enables CRL signing with ML-DSA, SLH-DSA, Ed25519, Ed448 and Falcon. Stateful hash-based schemes (LMS/XMSS) are rejected with ALGO_ID_E, since a CRL is reissued periodically and would exhaust the key's one-time signature state. Under WOLFSSL_NO_MALLOC the signature must still fit the fixed CertSignCtx.sig buffer, consistent with the certificate signing path. Tests cover CRL sign and verify through the certificate manager for ML-DSA (44/65/87), SLH-DSA (SHAKE and SHA2 128s), Ed25519 and Ed448, plus negative cases for a tampered signature, a sigType and key-family mismatch, and rejection of LMS/XMSS.
1 parent 5dd7717 commit 0d80b30

3 files changed

Lines changed: 583 additions & 25 deletions

File tree

0 commit comments

Comments
 (0)