Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@
// SPDX-License-Identifier: Apache-2.0

use anyhow::Result;
use arrayvec::ArrayVec;
use util_lib::response::PersonalizeResponse;

pub fn ft_ext(_response: &PersonalizeResponse) -> Result<Option<String>> {
pub fn ft_inject_certs_ext(endorsed_cert_concat: ArrayVec<u8, 5120>) -> Result<ArrayVec<u8, 5120>> {
Ok(endorsed_cert_concat)
}

pub fn ft_post_boot_ext(_response: &PersonalizeResponse) -> Result<Option<String>> {
Ok(None)
}
5 changes: 3 additions & 2 deletions sw/host/provisioning/ft_lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use cert_lib::{
CaConfig, CaKey, EndorsedCert, parse_and_endorse_x509_cert, validate_cert_chain,
validate_cwt_dice_chain,
};
use ft_ext_lib::ft_ext;
use ft_ext_lib::{ft_inject_certs_ext, ft_post_boot_ext};
use opentitanlib::app::{TransportWrapper, UartRx};
use opentitanlib::console::spi::SpiConsoleDevice;
use opentitanlib::io::console::ConsoleError;
Expand Down Expand Up @@ -515,6 +515,7 @@ fn provision_certificates(

// Execute extension hook.
let t0 = Instant::now();
endorsed_cert_concat = ft_inject_certs_ext(endorsed_cert_concat)?;
response.stats.log_elapsed_time("perso-ft-ext", t0);

// Authenticate WAS HMAC.
Expand Down Expand Up @@ -710,7 +711,7 @@ pub fn check_slot_b_boot_up(
let error_code_msg = r"BFV:.*\r\n";

// Optional text requried by certain SKUs.
let owner_ext_string = ft_ext(response)?;
let owner_ext_string = ft_post_boot_ext(response)?;

// Compile the full regex anchor including possible error messages and
// expected owner FW messages.
Expand Down
Loading