Skip to content

Commit 4bfaba0

Browse files
committed
Renamed SigstoreRootTrust to SigstoreTrustRoot
Signed-off-by: Tanner Gill <[email protected]>
1 parent 203a835 commit 4bfaba0

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/trust/sigstore/mod.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@
1515

1616
//! Helper Structs to interact with the Sigstore TUF repository.
1717
//!
18-
//! The main interaction point is [`SigstoreRootTrust`], which fetches Rekor's
18+
//! The main interaction point is [`SigstoreTrustRoot`], which fetches Rekor's
1919
//! public key and Fulcio's certificate.
2020
//!
2121
//! These can later be given to [`cosign::ClientBuilder`](crate::cosign::ClientBuilder)
2222
//! to enable Fulcio and Rekor integrations.
2323
//!
2424
//! # Example
2525
//!
26-
//! The `SigstoreRootTrust` instance can be created via the [`SigstoreRootTrust::prefetch`]
26+
//! The `SigstoreRootTrust` instance can be created via the [`SigstoreTrustRoot::prefetch`]
2727
//! method.
2828
//!
2929
//! ```rust,no_run
30-
//! use sigstore::trust::sigstore::SigstoreRootTrust;
31-
//! let repo = SigstoreRootTrust::new(None).unwrap().prefetch().unwrap();
30+
//! use sigstore::trust::sigstore::SigstoreTrustRoot;
31+
//! let repo = SigstoreTrustRoot::new(None).unwrap().prefetch().unwrap();
3232
//! ```
3333
use std::{
3434
cell::OnceCell,
@@ -53,13 +53,13 @@ pub use crate::trust::{ManualTrustRoot, TrustRoot};
5353

5454
/// Securely fetches Rekor public key and Fulcio certificates from Sigstore's TUF repository.
5555
#[derive(Debug)]
56-
pub struct SigstoreRootTrust {
56+
pub struct SigstoreTrustRoot {
5757
repository: tough::Repository,
5858
checkout_dir: Option<PathBuf>,
5959
trusted_root: OnceCell<TrustedRoot>,
6060
}
6161

62-
impl SigstoreRootTrust {
62+
impl SigstoreTrustRoot {
6363
/// Constructs a new trust repository established by a [tough::Repository].
6464
pub fn new(checkout_dir: Option<&Path>) -> Result<Self> {
6565
// These are statically defined and should always parse correctly.
@@ -108,17 +108,17 @@ impl SigstoreRootTrust {
108108

109109
/// Prefetches trust materials.
110110
///
111-
/// [TrustRoot::fulcio_certs()] and [TrustRoot::rekor_keys()] on [SigstoreRootTrust] lazily
111+
/// [TrustRoot::fulcio_certs()] and [TrustRoot::rekor_keys()] on [SigstoreTrustRoot] lazily
112112
/// fetches the requested data, which is problematic for async callers. Those callers should
113113
/// use this method to fetch the trust root ahead of time.
114114
///
115115
/// ```rust
116116
/// # use tokio::task::spawn_blocking;
117-
/// # use sigstore::trust::sigstore::SigstoreRootTrust;
117+
/// # use sigstore::trust::sigstore::SigstoreTrustRoot;
118118
/// # use sigstore::errors::Result;
119119
/// # #[tokio::main]
120120
/// # async fn main() -> std::result::Result<(), anyhow::Error> {
121-
/// let repo: Result<SigstoreRootTrust> = spawn_blocking(|| Ok(SigstoreRootTrust::new(None)?.prefetch()?)).await?;
121+
/// let repo: Result<SigstoreTrustRoot> = spawn_blocking(|| Ok(SigstoreTrustRoot::new(None)?.prefetch()?)).await?;
122122
/// // Now, get Fulcio and Rekor trust roots with the returned `SigstoreRootTrust`
123123
/// # Ok(())
124124
/// # }
@@ -149,7 +149,7 @@ impl SigstoreRootTrust {
149149
}
150150
}
151151

152-
impl crate::trust::TrustRoot for SigstoreRootTrust {
152+
impl crate::trust::TrustRoot for SigstoreTrustRoot {
153153
/// Fetch Fulcio certificates from the given TUF repository or reuse
154154
/// the local cache if its contents are not outdated.
155155
///

0 commit comments

Comments
 (0)