Skip to content

Conversation

@jvanz
Copy link
Contributor

@jvanz jvanz commented Dec 2, 2025

Summary

Adds a helper function to be used by clients to build a SigstoreTrustRoot from a JSON file following the TrustClientConfig protobuf spec.

Closes #525

Release Note

New function to allow clients to load the trusted roots from TrustClientConfig JSON files

Adds a helper function to be used by clients to build a
SigstoreTrustRoot from a JSON file following the TrustClientConfig
protobuf spec.

Signed-off-by: José Guilherme Vanz <[email protected]>
Comment on lines +231 to +245
impl TryFrom<ClientTrustConfig> for SigstoreTrustRoot {
type Error = SigstoreError;

fn try_from(value: ClientTrustConfig) -> Result<Self> {
let trusted_root =
value
.trusted_root
.ok_or(SigstoreError::SigstorePKIFileMalformedError(
"trusted_root field is missing".to_owned(),
))?;

Ok(SigstoreTrustRoot { trusted_root })
}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is copied with some changes from here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support "Bring your own PKI" (BYO PKEI)

1 participant