git

package
v0.0.0-...-488ceb6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sign

func Sign(ctx context.Context, ident *fulcio.Identity, data []byte, opts signature.SignOptions) ([]byte, *x509.Certificate, error)

Types

type Claim

type Claim struct {
	Key   ClaimCondition
	Value bool
}

Claim is a k/v pair representing the status of a given ClaimCondition.

func NewClaim

func NewClaim(c ClaimCondition, ok bool) Claim

type ClaimCondition

type ClaimCondition string
const (
	ClaimParsedSignature     ClaimCondition = "Parsed Git signature"
	ClaimValidatedSignature  ClaimCondition = "Validated Git signature"
	ClaimLocatedRekorEntry   ClaimCondition = "Located Rekor entry"
	ClaimValidatedRekorEntry ClaimCondition = "Validated Rekor entry"
)

type VerificationSummary

type VerificationSummary struct {
	// Certificate used to sign the commit.
	Cert *x509.Certificate
	// Rekor log entry of the commit.
	LogEntry *models.LogEntryAnon
	// List of claims about what succeeded / failed during validation.
	// This can be used to get details on what succeeded / failed during
	// validation. This is not an exhaustive list - claims may be missing
	// if validation ended early.
	Claims []Claim
}

func Verify

func Verify(ctx context.Context, data, sig []byte) (*VerificationSummary, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL