ot_certs/
lib.rs

1// Copyright lowRISC contributors (OpenTitan project).
2// Licensed under the Apache License, Version 2.0, see LICENSE for details.
3// SPDX-License-Identifier: Apache-2.0
4
5//! This crate handles generating OpenTitan certificates.
6//!
7//! These certificates are generated from a template and embedded onto an
8//! OpenTitan device.
9//!
10//! Templates may specify that some values are variables, in which case they
11//! will be filled in by the device itself. This crate will generate C code for
12//! setting/getting variable values of templates from OpenTitan firmware.
13//!
14//! Certificates are generated in both X.509 format and CWT (CBOR web token)
15//! format. Details of the certificates will be available in the documentation
16//! in the future.
17
18pub mod asn1;
19pub mod cbor;
20pub mod codegen;
21pub mod cwt;
22pub mod template;
23pub mod x509;
24
25use clap::ValueEnum;
26use serde::{Deserialize, Serialize};
27
28/// Supported OpenTitan certificate formats.
29#[derive(Clone, Debug, ValueEnum, Serialize, Deserialize)]
30pub enum CertFormat {
31    X509,
32    Cwt,
33}