pub struct TrustConfig {
pub default_log: Option<String>,
pub logs: HashMap<String, TrustRoot>,
}Expand description
Fields§
§default_log: Option<String>ID of the default log. Must reference a key in logs.
logs: HashMap<String, TrustRoot>Map of log ID to trust material.
Implementations§
Source§impl TrustConfig
impl TrustConfig
Sourcepub fn get_log(&self, log_id: &str) -> Option<&TrustRoot>
pub fn get_log(&self, log_id: &str) -> Option<&TrustRoot>
Look up trust material for a specific log by ID.
Sourcepub fn default_log(&self) -> Option<(&str, &TrustRoot)>
pub fn default_log(&self) -> Option<(&str, &TrustRoot)>
Get the default log’s trust material.
Sourcepub fn validate(&self) -> Result<(), TransparencyError>
pub fn validate(&self) -> Result<(), TransparencyError>
Validate the config at load time.
Checks:
- If
default_logis set, it must reference a key inlogs. - Every
TrustRootwhosesignature_algorithmisEcdsaP256MUST carry a non-emptyTrustRoot::ecdsa_log_public_key_der. Without it the verifier would trust whatever ECDSA key the bundle carried (→ trivially forgeable checkpoint). Without this check operators can ship configs that look healthy and silently accept any ECDSA signature.
Sourcepub fn default_config() -> Self
pub fn default_config() -> Self
Compiled-in default: Rekor production shard.
Origin pinned from GET https://rekor.sigstore.dev/api/v1/log
on 2026-04-09. Public key from sigstore trusted_root.json.
Trait Implementations§
Source§impl Clone for TrustConfig
impl Clone for TrustConfig
Source§fn clone(&self) -> TrustConfig
fn clone(&self) -> TrustConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TrustConfig
impl Debug for TrustConfig
Source§impl<'de> Deserialize<'de> for TrustConfig
impl<'de> Deserialize<'de> for TrustConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TrustConfig
impl RefUnwindSafe for TrustConfig
impl Send for TrustConfig
impl Sync for TrustConfig
impl Unpin for TrustConfig
impl UnsafeUnpin for TrustConfig
impl UnwindSafe for TrustConfig
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