Class BuildSignature (2.19.0)

public final class BuildSignature extends GeneratedMessageV3 implements BuildSignatureOrBuilder

Message encapsulating the signature of the verified build.

Protobuf type grafeas.v1beta1.build.BuildSignature

Static Fields

KEY_ID_FIELD_NUMBER

public static final int KEY_ID_FIELD_NUMBER
Field Value
TypeDescription
int

KEY_TYPE_FIELD_NUMBER

public static final int KEY_TYPE_FIELD_NUMBER
Field Value
TypeDescription
int

PUBLIC_KEY_FIELD_NUMBER

public static final int PUBLIC_KEY_FIELD_NUMBER
Field Value
TypeDescription
int

SIGNATURE_FIELD_NUMBER

public static final int SIGNATURE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static BuildSignature getDefaultInstance()
Returns
TypeDescription
BuildSignature

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static BuildSignature.Builder newBuilder()
Returns
TypeDescription
BuildSignature.Builder

newBuilder(BuildSignature prototype)

public static BuildSignature.Builder newBuilder(BuildSignature prototype)
Parameter
NameDescription
prototypeBuildSignature
Returns
TypeDescription
BuildSignature.Builder

parseDelimitedFrom(InputStream input)

public static BuildSignature parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
BuildSignature
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static BuildSignature parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BuildSignature
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static BuildSignature parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
BuildSignature
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static BuildSignature parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BuildSignature
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static BuildSignature parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
BuildSignature
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static BuildSignature parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BuildSignature
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static BuildSignature parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
BuildSignature
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static BuildSignature parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BuildSignature
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static BuildSignature parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
BuildSignature
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static BuildSignature parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BuildSignature
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static BuildSignature parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
BuildSignature
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static BuildSignature parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BuildSignature
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<BuildSignature> parser()
Returns
TypeDescription
Parser<BuildSignature>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public BuildSignature getDefaultInstanceForType()
Returns
TypeDescription
BuildSignature

getKeyId()

public String getKeyId()

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).

string key_id = 3;

Returns
TypeDescription
String

The keyId.

getKeyIdBytes()

public ByteString getKeyIdBytes()

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).

string key_id = 3;

Returns
TypeDescription
ByteString

The bytes for keyId.

getKeyType()

public BuildSignature.KeyType getKeyType()

The type of the key, either stored in public_key or referenced in key_id.

.grafeas.v1beta1.build.BuildSignature.KeyType key_type = 4;

Returns
TypeDescription
BuildSignature.KeyType

The keyType.

getKeyTypeValue()

public int getKeyTypeValue()

The type of the key, either stored in public_key or referenced in key_id.

.grafeas.v1beta1.build.BuildSignature.KeyType key_type = 4;

Returns
TypeDescription
int

The enum numeric value on the wire for keyType.

getParserForType()

public Parser<BuildSignature> getParserForType()
Returns
TypeDescription
Parser<BuildSignature>
Overrides

getPublicKey()

public String getPublicKey()

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

string public_key = 1;

Returns
TypeDescription
String

The publicKey.

getPublicKeyBytes()

public ByteString getPublicKeyBytes()

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

string public_key = 1;

Returns
TypeDescription
ByteString

The bytes for publicKey.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getSignature()

public ByteString getSignature()

Required. Signature of the related BuildProvenance. In JSON, this is base-64 encoded.

bytes signature = 2;

Returns
TypeDescription
ByteString

The signature.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public BuildSignature.Builder newBuilderForType()
Returns
TypeDescription
BuildSignature.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected BuildSignature.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
BuildSignature.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public BuildSignature.Builder toBuilder()
Returns
TypeDescription
BuildSignature.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException