pub struct IntermediateCa { /* private fields */ }Expand description
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.
IntermediateCa::csrmakes the key (once) and returns its CSR.- The root CA issues the intermediate certificate and a range of node ids.
IntermediateCa::installstores them with the key; from then on the controller signs its own and its devices’ certificates, and every controller of the fabric reaches every device of it.
Implementations§
Source§impl IntermediateCa
impl IntermediateCa
Sourcepub fn csr<C: Crypto>(path: &Path, crypto: C) -> Result<Vec<u8>, Error>
pub fn csr<C: Crypto>(path: &Path, crypto: C) -> Result<Vec<u8>, Error>
The CSR (DER PKCS#10) for this controller’s intermediate key, made on
the first call and the same on later ones until Self::install.
Sourcepub fn install(path: &Path, issued: Issued) -> Result<(), Error>
pub fn install(path: &Path, issued: Issued) -> Result<(), Error>
Store what the root CA issued for the CSR from Self::csr.
Sourcepub fn node_ids_left(&self) -> u64
pub fn node_ids_left(&self) -> u64
Node ids left in the range.
Sourcepub fn extend_node_ids(&self, range: NodeIdRange) -> Result<(), Error>
pub fn extend_node_ids(&self, range: NodeIdRange) -> Result<(), Error>
Take a further range from the root CA.
Trait Implementations§
Source§impl CertificateAuthority for IntermediateCa
impl CertificateAuthority for IntermediateCa
Source§fn intermediate_cert(&self) -> Option<&[u8]>
fn intermediate_cert(&self) -> Option<&[u8]>
The intermediate certificate (ICAC) NOCs are signed with, Matter TLV
encoding, or
None when the root signs them directly.Source§async fn allocate_node_id(&self) -> Result<u64, Error>
async fn allocate_node_id(&self) -> Result<u64, Error>
Allocate a node id that no other node of the fabric has.
Source§async fn issue_noc<C: Crypto>(
&self,
crypto: C,
csr: &[u8],
node_id: u64,
cats: &[u32],
) -> Result<Vec<u8>, Error>
async fn issue_noc<C: Crypto>( &self, crypto: C, csr: &[u8], node_id: u64, cats: &[u32], ) -> Result<Vec<u8>, Error>
Issue a NOC for the public key in
csr (DER PKCS#10) and node_id,
with up to three CASE Authenticated Tags.Source§fn signing_key(&self) -> Option<&[u8; 32]>
fn signing_key(&self) -> Option<&[u8; 32]>
The key NOCs are signed with, if this process holds it.
Auto Trait Implementations§
impl !Freeze for IntermediateCa
impl !RefUnwindSafe for IntermediateCa
impl !Sync for IntermediateCa
impl Send for IntermediateCa
impl Unpin for IntermediateCa
impl UnsafeUnpin for IntermediateCa
impl UnwindSafe for IntermediateCa
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Init<T> for T
impl<T> Init<T> for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T, I> IntoFallibleInit<T> for Iwhere
I: Init<T>,
impl<T, I> IntoFallibleInit<T> for Iwhere
I: Init<T>,
§fn into_fallible<E>(self) -> impl Init<T, E>
fn into_fallible<E>(self) -> impl Init<T, E>
Convert the infallible initializer to a fallible one.
impl<T> MaybeSend for Twhere
T: ?Sized,
impl<T> MaybeSendSync for Twhere
T: ?Sized,
§impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
type Error = <Target as OctetsFrom<Source>>::Error
§fn try_octets_into(
self,
) -> Result<Target, <Source as OctetsInto<Target>>::Error>
fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>
Performs the conversion.
§fn octets_into(self) -> Target
fn octets_into(self) -> Target
Performs an infallible conversion.