#[non_exhaustive]pub struct ContainerImageSignature {
pub payload: Bytes,
pub signature: Bytes,
pub public_key: Bytes,
pub sig_alg: SigningAlgorithm,
/* private fields */
}Expand description
ContainerImageSignature holds necessary metadata to verify a container image signature.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.payload: BytesOptional. The binary signature payload following the SimpleSigning format https://github.com/sigstore/cosign/blob/main/specs/SIGNATURE_SPEC.md#simple-signing. This payload includes the container image digest.
signature: BytesOptional. A signature over the payload. The container image digest is incorporated into the signature as follows:
- Generate a SimpleSigning format payload that includes the container image digest.
- Generate a signature over SHA256 digest of the payload.
The signature generation process can be represented as follows:
Sign(sha256(SimpleSigningPayload(sha256(Image Manifest))))
public_key: BytesOptional. Reserved for future use.
sig_alg: SigningAlgorithmOptional. Reserved for future use.
Implementations§
Source§impl ContainerImageSignature
impl ContainerImageSignature
pub fn new() -> Self
Sourcepub fn set_payload<T: Into<Bytes>>(self, v: T) -> Self
pub fn set_payload<T: Into<Bytes>>(self, v: T) -> Self
Sourcepub fn set_signature<T: Into<Bytes>>(self, v: T) -> Self
pub fn set_signature<T: Into<Bytes>>(self, v: T) -> Self
Sourcepub fn set_public_key<T: Into<Bytes>>(self, v: T) -> Self
pub fn set_public_key<T: Into<Bytes>>(self, v: T) -> Self
Sets the value of public_key.
§Example
ⓘ
let x = ContainerImageSignature::new().set_public_key(bytes::Bytes::from_static(b"example"));Sourcepub fn set_sig_alg<T: Into<SigningAlgorithm>>(self, v: T) -> Self
pub fn set_sig_alg<T: Into<SigningAlgorithm>>(self, v: T) -> Self
Sets the value of sig_alg.
§Example
ⓘ
use google_cloud_confidentialcomputing_v1::model::SigningAlgorithm;
let x0 = ContainerImageSignature::new().set_sig_alg(SigningAlgorithm::RsassaPssSha256);
let x1 = ContainerImageSignature::new().set_sig_alg(SigningAlgorithm::RsassaPkcs1V15Sha256);
let x2 = ContainerImageSignature::new().set_sig_alg(SigningAlgorithm::EcdsaP256Sha256);Trait Implementations§
Source§impl Clone for ContainerImageSignature
impl Clone for ContainerImageSignature
Source§fn clone(&self) -> ContainerImageSignature
fn clone(&self) -> ContainerImageSignature
Returns a duplicate of the value. Read more
1.0.0 · 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 ContainerImageSignature
impl Debug for ContainerImageSignature
Source§impl Default for ContainerImageSignature
impl Default for ContainerImageSignature
Source§fn default() -> ContainerImageSignature
fn default() -> ContainerImageSignature
Returns the “default value” for a type. Read more
Source§impl Message for ContainerImageSignature
impl Message for ContainerImageSignature
Source§impl PartialEq for ContainerImageSignature
impl PartialEq for ContainerImageSignature
impl StructuralPartialEq for ContainerImageSignature
Auto Trait Implementations§
impl !Freeze for ContainerImageSignature
impl RefUnwindSafe for ContainerImageSignature
impl Send for ContainerImageSignature
impl Sync for ContainerImageSignature
impl Unpin for ContainerImageSignature
impl UnwindSafe for ContainerImageSignature
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