pub struct BuildSignature {
pub key_id: Option<String>,
pub key_type: Option<String>,
pub public_key: Option<String>,
pub signature: Option<Vec<u8>>,
}
Expand description
Message encapsulating the signature of the verified build.
This type is not used in any activity, and only used as part of another schema.
Fields§
§key_id: Option<String>
An ID for the key used to sign. This could be either an ID for the key stored in public_key
(such as the ID or fingerprint for a PGP key, or the CN for a cert), or a reference to an external key (such as a reference to a key in Cloud Key Management Service).
key_type: Option<String>
The type of the key, either stored in public_key
or referenced in key_id
.
public_key: Option<String>
Public key of the builder which can be used to verify that the related findings are valid and unchanged. If key_type
is empty, this defaults to PEM encoded public keys. This field may be empty if key_id
references an external key. For Cloud Build based signatures, this is a PEM encoded public key. To verify the Cloud Build signature, place the contents of this field into a file (public.pem). The signature field is base64-decoded into its binary representation in signature.bin, and the provenance bytes from BuildDetails
are base64-decoded into a binary representation in signed.bin. OpenSSL can then verify the signature: openssl sha256 -verify public.pem -signature signature.bin signed.bin
signature: Option<Vec<u8>>
Required. Signature of the related BuildProvenance
. In JSON, this is base-64 encoded.
Trait Implementations§
Source§impl Clone for BuildSignature
impl Clone for BuildSignature
Source§fn clone(&self) -> BuildSignature
fn clone(&self) -> BuildSignature
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for BuildSignature
impl Debug for BuildSignature
Source§impl Default for BuildSignature
impl Default for BuildSignature
Source§fn default() -> BuildSignature
fn default() -> BuildSignature
Source§impl<'de> Deserialize<'de> for BuildSignature
impl<'de> Deserialize<'de> for BuildSignature
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>,
Source§impl Serialize for BuildSignature
impl Serialize for BuildSignature
impl Part for BuildSignature
Auto Trait Implementations§
impl Freeze for BuildSignature
impl RefUnwindSafe for BuildSignature
impl Send for BuildSignature
impl Sync for BuildSignature
impl Unpin for BuildSignature
impl UnwindSafe for BuildSignature
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more