From dc33c00cb2e0d128d200c8b95d8807650ef37d25 Mon Sep 17 00:00:00 2001 From: ok-nick Date: Wed, 10 Jul 2024 13:33:10 -0400 Subject: [PATCH 1/2] Expose `SignatureInfo` publicly --- sdk/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/src/lib.rs b/sdk/src/lib.rs index 08e782724..d433a95d6 100644 --- a/sdk/src/lib.rs +++ b/sdk/src/lib.rs @@ -122,7 +122,7 @@ pub use hash_utils::{hash_stream_by_alg, HashRange}; pub use ingredient::Ingredient; #[cfg(feature = "file_io")] pub use ingredient::{DefaultOptions, IngredientOptions}; -pub use manifest::Manifest; +pub use manifest::{Manifest, SignatureInfo}; pub use manifest_assertion::{ManifestAssertion, ManifestAssertionKind}; #[cfg(feature = "v1_api")] pub use manifest_store::ManifestStore; From aaf51e4f31dd59ebfbf5e8a2b5ce4a5c41b0e5e4 Mon Sep 17 00:00:00 2001 From: ok-nick Date: Wed, 10 Jul 2024 14:21:57 -0400 Subject: [PATCH 2/2] Make `SignatureInfo` ser/de fields public --- sdk/src/manifest.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sdk/src/manifest.rs b/sdk/src/manifest.rs index 9e0c2d438..1a7d049de 100644 --- a/sdk/src/manifest.rs +++ b/sdk/src/manifest.rs @@ -1402,26 +1402,26 @@ impl std::fmt::Display for Manifest { pub struct SignatureInfo { /// human readable issuing authority for this signature #[serde(skip_serializing_if = "Option::is_none")] - alg: Option, + pub alg: Option, /// human readable issuing authority for this signature #[serde(skip_serializing_if = "Option::is_none")] - issuer: Option, + pub issuer: Option, /// The serial number of the certificate #[serde(skip_serializing_if = "Option::is_none")] - cert_serial_number: Option, + pub cert_serial_number: Option, /// the time the signature was created #[serde(skip_serializing_if = "Option::is_none")] - time: Option, + pub time: Option, + + /// revocation status of the certificate + #[serde(skip_serializing_if = "Option::is_none")] + pub revocation_status: Option, /// the cert chain for this claim #[serde(skip)] // don't serialize this, let someone ask for it cert_chain: String, - - /// revocation status of the certificate - #[serde(skip_serializing_if = "Option::is_none")] - revocation_status: Option, } impl SignatureInfo {