Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCertToEnvelope ¶
AddCertToEnvelope takes a signed DSSE Envelope and a PEM-encoded certificate, and returns an Envelope with the certificate inside the Signature of the Envelope. This assumes there is only one signature present in the envelope.
func GetCertFromEnvelope ¶
GetCertFromEnvelope takes a signed Envelope and extracts the PEM-encoded certificate from the signature. This assumes there is only one signature present in the envelope.
Types ¶
type Envelope ¶
type Envelope struct { PayloadType string `json:"payloadType"` Payload string `json:"payload"` Signatures []Signature `json:"signatures"` }
Envelope captures an envelope as described by the Secure Systems Lab Signing Specification. See here: https://github.com/secure-systems-lab/signing-spec/blob/master/envelope.md
type Signature ¶
type Signature struct { KeyID string `json:"keyid"` Sig string `json:"sig"` Cert string `json:"cert"` }
Signature represents a generic in-toto signature that contains the identifier of the key which was used to create the signature. The used signature scheme has to be agreed upon by the signer and verifer out of band. The signature is a base64 encoding of the raw bytes from the signature algorithm. The cert is a PEM encoded string of the signing certificate.