{"modulePath":"github.com/chainloop-dev/chainloop","version":"v1.138.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package attestation\n\n## Functions\n\n```go\nfunc BundleFromDSSEEnvelope(dsseEnvelope *dsse.Envelope) (*protobundle.Bundle, error)\n```\n\n```go\nfunc DSSEEnvelopeFromBundle(bundle *protobundle.Bundle) *dsse.Envelope\n```\nDSSEEnvelopeFromBundle Extracts a DSSE envelope from a Sigstore bundle (Sigstore bundles have their own protobuf implementation for DSSE)\n\n```go\nfunc DSSEEnvelopeFromBundleBytes(bundle []byte) (*dsse.Envelope, error)\n```\nDSSEEnvelopeFromBundleBytes extracts a DSSE envelope from the protojson-encoded bytes of a Sigstore bundle. It validates that the bundle carries a DSSE envelope with at least one signature, since callers (and DSSEEnvelopeFromBundle) assume that invariant.\n\n```go\nfunc FixSignatureInBundle(bundle *protobundle.Bundle)\n```\nFixSignatureInBundle removes any additional base64 encoding from the signature in the bundle. Kept for backward compatibility with attestations stored before the fix for [https://github.com/chainloop-dev/chainloop/issues/1832](https://github.com/chainloop-dev/chainloop/issues/1832), whose signatures are base64-encoded twice. New bundles produced by BundleFromDSSEEnvelope already carry a properly decoded signature.\n\n```go\nfunc JSONEnvelopeWithDigest(envelope *dsse.Envelope) ([]byte, cr_v1.Hash, error)\n```\nJSONEnvelopeWithDigest returns the JSON content of the envelope and its digest.\n\n","path":"github.com/chainloop-dev/chainloop/pkg/attestation","name":"attestation","synopsis":"","isRedistributable":true}
