Struct google_api_proto::grafeas::v1beta1::attestation::PgpSignedAttestation
source · pub struct PgpSignedAttestation {
pub signature: String,
pub content_type: i32,
pub key_id: Option<KeyId>,
}
Expand description
An attestation wrapper with a PGP-compatible signature. This message only
supports ATTACHED
signatures, where the payload that is signed is included
alongside the signature itself in the same file.
Fields§
§signature: String
Required. The raw content of the signature, as output by GNU Privacy Guard
(GPG) or equivalent. Since this message only supports attached signatures,
the payload that was signed must be attached. While the signature format
supported is dependent on the verification implementation, currently only
ASCII-armored (--armor
to gpg), non-clearsigned (--sign
rather than
--clearsign
to gpg) are supported. Concretely, gpg --sign --armor --output=signature.gpg payload.json
will create the signature content
expected in this field in signature.gpg
for the payload.json
attestation payload.
content_type: i32
Type (for example schema) of the attestation payload that was signed. The verifier must ensure that the provided type is one that the verifier supports, and that the attestation payload is a valid instantiation of that type (for example by validating a JSON schema).
key_id: Option<KeyId>
This field is used by verifiers to select the public key used to validate the signature. Note that the policy of the verifier ultimately determines which public keys verify a signature based on the context of the verification. There is no guarantee validation will succeed if the verifier has no key matching this ID, even if it has a key under a different ID that would verify the signature. Note that this ID should also be present in the signature content above, but that is not expected to be used by the verifier.
Implementations§
source§impl PgpSignedAttestation
impl PgpSignedAttestation
sourcepub fn content_type(&self) -> ContentType
pub fn content_type(&self) -> ContentType
Returns the enum value of content_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_content_type(&mut self, value: ContentType)
pub fn set_content_type(&mut self, value: ContentType)
Sets content_type
to the provided enum value.
Trait Implementations§
source§impl Clone for PgpSignedAttestation
impl Clone for PgpSignedAttestation
source§fn clone(&self) -> PgpSignedAttestation
fn clone(&self) -> PgpSignedAttestation
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PgpSignedAttestation
impl Debug for PgpSignedAttestation
source§impl Default for PgpSignedAttestation
impl Default for PgpSignedAttestation
source§impl Message for PgpSignedAttestation
impl Message for PgpSignedAttestation
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for PgpSignedAttestation
impl PartialEq for PgpSignedAttestation
source§fn eq(&self, other: &PgpSignedAttestation) -> bool
fn eq(&self, other: &PgpSignedAttestation) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for PgpSignedAttestation
Auto Trait Implementations§
impl Freeze for PgpSignedAttestation
impl RefUnwindSafe for PgpSignedAttestation
impl Send for PgpSignedAttestation
impl Sync for PgpSignedAttestation
impl Unpin for PgpSignedAttestation
impl UnwindSafe for PgpSignedAttestation
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request