Skip to main content

Module builder

Module builder 

Source
Expand description

Public builder API for MatterCertificate.

Introduced in M6.3. Splits certificate construction into two stages so callers can sign with any backend (sync, HSM, OS keychain, offline ceremony) without the builder depending on a signer trait.

MatterCertificate::builder()
    .serial(...).issuer(...).subject(...).validity(...)
    .public_key(...).extensions(...)
    .build_unsigned()?            // Result<UnsignedCertificate, Error>
    .tbs_der()?                   // Result<Vec<u8>, Error>  — bytes to sign
    // ... caller invokes its own ECDSA-P256-SHA256 signer ...
    unsigned.assemble(sig);       // MatterCertificate, infallible

Structs§

Builder
Builder for MatterCertificate. Construct via MatterCertificate::builder().
UnsignedCertificate
A certificate whose fields are set but whose signature has not yet been computed. Convert to a signed MatterCertificate via Self::assemble once an external signer produces the 64-byte raw ECDSA signature over Self::tbs_der.