pub struct Credentials {
pub noc: Vec<u8, OPERATIONAL_CERT_MAX>,
pub icac: Option<Vec<u8, OPERATIONAL_CERT_MAX>>,
pub rcac: Vec<u8, OPERATIONAL_CERT_MAX>,
pub vvsc: Option<Vec<u8, OPERATIONAL_CERT_MAX>>,
}rustcrypto only.Expand description
One fabric’s operational credential chain, as the NOCs and TrustedRootCertificates
attributes serve it (§11.18.5.1, §11.18.5.5).
All three are Matter TLV certificates, not X.509 — §11.18.6.8 says “encoded using Matter Certificate Encoding” — and they are kept verbatim. A re-encoding would be a different octet string, and §6.5.2’s signature rule means a round-tripped certificate is one whose signature a peer may no longer be able to check.
Fields§
§noc: Vec<u8, OPERATIONAL_CERT_MAX>NOC — the node operational certificate for this fabric.
icac: Option<Vec<u8, OPERATIONAL_CERT_MAX>>ICAC — the intermediate, if the chain has one. §11.18.4.4: “If no ICAC is present in
the chain, this field SHALL be set to null.”
rcac: Vec<u8, OPERATIONAL_CERT_MAX>The trusted root, from AddTrustedRootCertificate. Served through
TrustedRootCertificates rather than through NOCs: §11.18.4.4 keeps it out of
NOCStruct deliberately, because several fabrics may share one root.
vvsc: Option<Vec<u8, OPERATIONAL_CERT_MAX>>VVSC — the Vendor Verification Signer Certificate (§11.18.4.4 field 3).
“The VVSC field is mutually exclusive with the ICAC field”: it exists for
root-per-fabric deployments that have no intermediate to carry the signer, and
Credentials::is_valid enforces the exclusion.
Implementations§
Source§impl Credentials
impl Credentials
Sourcepub fn new(noc: &[u8], rcac: &[u8]) -> Result<Self>
pub fn new(noc: &[u8], rcac: &[u8]) -> Result<Self>
A chain with a NOC and a root, and no intermediate.