Skip to main content

Module ca

Module ca 

Source
Expand description

The fabric’s certificate authority.

A Matter fabric is rooted in a CA: its root certificate (RCAC), usually an intermediate (ICAC), and the node operational certificates (NOCs) it signs for every node, the controller included. Where that CA lives is the deployer’s choice, so it is a trait:

  • FileCa keeps the chain and the ICAC key in a directory. It is what a standalone controller uses, and is its own root of trust.
  • A platform CA (an HTTP service, an HSM) keeps its keys elsewhere and issues NOCs on request. Several controllers on one fabric then share the root, and the CA hands out node ids so they never collide.

Until rs-matter’s Commissioner can await an issuer, commissioning signs NOCs in-process, so it needs CertificateAuthority::signing_key. A CA that cannot give one can still issue the controller’s own certificate; see docs/design.md, “Upstream work”.

Structs§

FileCa
A CA kept in one file of the state directory, readable by its owner only.
IntermediateCa
An intermediate CA whose certificate a root CA elsewhere issued (a platform’s, holding one fabric’s root for several controllers), for a key made here that never leaves this controller.
Issued
What a root CA returns for an intermediate’s CSR.
NodeIdRange
A range of node ids a root CA handed this controller.

Enums§

AnyCa
The CA a controller runs with.

Constants§

IPK_LEN
The length of an IPK epoch key.
SECRET_KEY_LEN
The length of a P-256 secret key in its canonical form.

Traits§

CertificateAuthority
Issues the fabric’s operational certificates.

Functions§

install_intermediate
Install (or replace) what a root CA issued for the controller in state_dir. With no new key waiting (no CSR since the last install), only a further node id range is taken.
intermediate_csr
IntermediateCa::csr for the controller whose state is in state_dir (where crate::CaChoice::Intermediate looks), with this crate’s crypto.
intermediate_path
Where a controller keeps its intermediate CA.