pub struct CdSigningRoots { /* private fields */ }Expand description
Trusted CSA Certification Declaration signing roots.
Built from production roots via Self::from_cert_der (X.509 CD
signing certificates, as published by the CSA DCL) or
Self::from_pem (bare SubjectPublicKeyInfo PEMs), or seeded with
the bundled synthetic CSA-test root via
Self::with_example_device_roots.
Internally stores each trusted root as a SEC1-uncompressed P-256
public key (65 bytes: 0x04 || X || Y) so signature verification
can call ring::signature::UnparsedPublicKey directly without
re-parsing.
Implementations§
Source§impl CdSigningRoots
impl CdSigningRoots
Sourcepub fn with_example_device_roots() -> Self
pub fn with_example_device_roots() -> Self
Build a trust store seeded with the CD signing roots that verify CSA test / example devices and the hermetic loopback:
- the bundled synthetic root — its private half signs the loopback and fixture CDs the verifier tests consume;
- chip’s real test CD signing authority; and
- CSA production “CD Signing Key 001” — the key that signs the
VID=0xFFF1 CD every
CONFIG_EXAMPLE_DAC_PROVIDERdevice serves, including the esp-matter ESP32-C6. (chip’s ownDefaultDeviceAttestationVerifiertrusts the test and production keys; trusting only the test key rejects the C6, which cost a live commission to learn — seechip_cd_vector.rs.)
This verifies test / dev / example devices — not the full set
of CSA production-certified products, which may present CDs signed
by other CSA production keys. A commissioner for arbitrary
certified devices loads the whole CSA root set via
Self::from_cert_der / Self::from_pem (e.g.
matter_controller::AttestationTrust::from_dirs).
Each bundled root is a compile-time constant; one that fails to
parse is skipped rather than panicking, and the verifier then
rejects any CD that needed it with
AttestationError::CertificationDeclarationSignatureInvalid.
Sourcepub fn from_pem(pems: &[&[u8]]) -> Result<Self, AttestationError>
pub fn from_pem(pems: &[&[u8]]) -> Result<Self, AttestationError>
Build a trust store from PEM-encoded P-256
SubjectPublicKeyInfo blobs (one per trusted CSA signing
root).
§Errors
Returns AttestationError::CertificationDeclarationMalformed
if any input fails to parse. An empty slice returns an empty
trust store.
Sourcepub fn from_cert_der(certs: &[&[u8]]) -> Result<Self, AttestationError>
pub fn from_cert_der(certs: &[&[u8]]) -> Result<Self, AttestationError>
Build a trust store from X.509 certificate DER blobs (one per trusted CSA CD signing root), extracting each certificate’s P-256 subject public key.
This is the ingestion path for real-world CD signing roots: the CSA
Distributed Compliance Ledger — and the connectedhomeip
credentials/production/cd-certs/ mirror of it — publish the roots as
X.509 certificates, not as the bare SubjectPublicKeyInfo PEMs that
Self::from_pem consumes. There are several distinct CSA CD signing
keys, so a real commissioner typically loads the whole directory.
The certificate is treated purely as a trust anchor: only its subject
public key is extracted. No signature, validity-window, or chain checks
are performed — the operator vouches for the roots by supplying them
(exactly as Self::from_pem trusts the keys it is given).
§Errors
Returns AttestationError::CertificationDeclarationMalformed if any
input fails to parse as an X.509 certificate, or does not carry a
65-byte SEC1-uncompressed P-256 public key.
Trait Implementations§
Source§impl Clone for CdSigningRoots
impl Clone for CdSigningRoots
Source§fn clone(&self) -> CdSigningRoots
fn clone(&self) -> CdSigningRoots
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more