From e91ede7cc18b45fd3653c5ebcb2baee3670cb331 Mon Sep 17 00:00:00 2001 From: Tim Trippel Date: Wed, 30 Oct 2024 14:01:10 -0700 Subject: [PATCH] [ot_certs] move CertFormat enum to ot_certs lib This consolidates several definitions of the `CertFormat` enum, and moves the single definition to the `ot_certs` lib where it can be shared across the code base. Signed-off-by: Tim Trippel --- sw/host/opentitantool/src/command/certificate.rs | 9 ++------- sw/host/ot_certs/BUILD | 1 + sw/host/ot_certs/src/lib.rs | 9 +++++++++ sw/host/provisioning/cert_lib/BUILD | 1 - sw/host/provisioning/cert_lib/src/lib.rs | 8 +------- sw/host/provisioning/ft_lib/src/lib.rs | 3 ++- 6 files changed, 15 insertions(+), 16 deletions(-) diff --git a/sw/host/opentitantool/src/command/certificate.rs b/sw/host/opentitantool/src/command/certificate.rs index 30ff42a44ddb26..8a54cbd02ac308 100644 --- a/sw/host/opentitantool/src/command/certificate.rs +++ b/sw/host/opentitantool/src/command/certificate.rs @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 use anyhow::{bail, Context, Result}; -use clap::{Args, Subcommand, ValueEnum}; +use clap::{Args, Subcommand}; use serde_annotate::Annotate; use std::any::Any; use std::fs::{self, File}; @@ -14,6 +14,7 @@ use opentitanlib::app::command::CommandDispatch; use opentitanlib::app::TransportWrapper; use ot_certs::template::subst::{Subst, SubstData}; use ot_certs::template::Template; +use ot_certs::CertFormat; use ot_certs::{codegen, x509}; fn load_template(path: &PathBuf) -> Result