Skip to main content

create_fabric

Function create_fabric 

Source
pub fn create_fabric(
    cfg: &FabricConfig,
    rng: &dyn NocRng,
) -> Result<FabricEntry, Error>
Expand description

Create a fabric: generate the RCAC root key + self-signed RCAC, a fresh IPK, the commissioner operational keypair, and the commissioner NOC.

The returned FabricEntry is fully persistable (private keys captured as PKCS#8 DER) and has no devices yet.

ยงErrors

Returns Error::Signer if key generation fails, or Error::Noc if RCAC construction or NOC issuance fails.