Documentation
¶
Index ¶
- Constants
- Variables
- func CreateX509Cert(subject string, signer dsse.SignerVerifier) ([]byte, error)
- func WithTL(ctx context.Context, tl TL) context.Context
- type MockTL
- func (tl *MockTL) UnmarshalEntry(entryBytes []byte) (any, error)
- func (tl *MockTL) UploadLogEntry(ctx context.Context, subject string, payload, signature []byte, ...) ([]byte, error)
- func (tl *MockTL) VerifyEntryPayload(entryBytes, payload, publicKey []byte) error
- func (tl *MockTL) VerifyLogEntry(ctx context.Context, entryBytes []byte) (time.Time, error)
- type RekorTL
- func (tl *RekorTL) UnmarshalEntry(entry []byte) (any, error)
- func (tl *RekorTL) UploadLogEntry(ctx context.Context, subject string, payload, signature []byte, ...) ([]byte, error)
- func (tl *RekorTL) VerifyEntryPayload(entryBytes, payload, publicKey []byte) error
- func (tl *RekorTL) VerifyLogEntry(ctx context.Context, entryBytes []byte) (time.Time, error)
- type TL
- type TLPayload
Constants ¶
View Source
const ( UseMockTL = true TestEntry = `` /* 3051-byte string literal not displayed */ )
View Source
const (
DefaultRekorURL = "https://rekor.sigstore.dev"
)
Variables ¶
View Source
var TLCtxKey tlCtxKeyType
Functions ¶
func CreateX509Cert ¶
func CreateX509Cert(subject string, signer dsse.SignerVerifier) ([]byte, error)
CreateX509Cert generates a self-signed x509 cert for TL submission.
Types ¶
type MockTL ¶
type MockTL struct { UploadLogEntryFunc func(ctx context.Context, subject string, payload, signature []byte, signer dsse.SignerVerifier) ([]byte, error) VerifyLogEntryFunc func(ctx context.Context, entryBytes []byte) (time.Time, error) VerifyEntryPayloadFunc func(entryBytes, payload, publicKey []byte) error UnmarshalEntryFunc func(entryBytes []byte) (any, error) }
func (*MockTL) UploadLogEntry ¶
func (*MockTL) VerifyEntryPayload ¶
type RekorTL ¶
type RekorTL struct{}
func (*RekorTL) UploadLogEntry ¶
func (tl *RekorTL) UploadLogEntry(ctx context.Context, subject string, payload, signature []byte, signer dsse.SignerVerifier) ([]byte, error)
UploadLogEntry submits a PK token signature to the transparency log.
func (*RekorTL) VerifyEntryPayload ¶
VerifyEntryPayload checks that the TL entry payload matches envelope payload.
type TL ¶
type TL interface { UploadLogEntry(ctx context.Context, subject string, payload, signature []byte, signer dsse.SignerVerifier) ([]byte, error) VerifyLogEntry(ctx context.Context, entryBytes []byte) (time.Time, error) VerifyEntryPayload(entryBytes, payload, publicKey []byte) error UnmarshalEntry(entryBytes []byte) (any, error) }
Click to show internal directories.
Click to hide internal directories.