tlog

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: Apache-2.0 Imports: 31 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidRekorV2Entry = errors.New("type error: object is not a Rekor v2 type, try parsing as Rekor v1")
View Source
var ErrNilValue = errors.New("validation error: nil value in transaction log entry")

Functions

func ValidateEntry

func ValidateEntry(entry *Entry) error

func VerifyCheckpointAndInclusion added in v1.1.0

func VerifyCheckpointAndInclusion(entry *Entry, verifier signature.Verifier, origin string) error

VerifyCheckpointAndInclusion verifies a checkpoint and the entry's inclusion in the transparency log. This function is compatible with Rekor v1 and Rekor v2. Prefer verify.VerifyTlogEntry, which also compares the log entry against a provided bundle.

func VerifyInclusion

func VerifyInclusion(entry *Entry, verifier signature.Verifier) error

VerifyInclusion verifies a Rekor v1-style checkpoint and the entry's inclusion in the Rekor v1 log. Prefer verify.VerifyTlogEntry, which also compares the log entry against a provided bundle.

func VerifySET

func VerifySET(entry *Entry, verifiers map[string]*root.TransparencyLog) error

VerifySET verifies the inclusion promise, aka the Signed Entry Timestamp. Prefer verify.VerifyTlogEntry, which also compares the log entry against a provided bundle.

Types

type Entry

type Entry struct {
	// contains filtered or unexported fields
}

func NewEntry deprecated

func NewEntry(body []byte, integratedTime int64, logIndex int64, logID []byte, signedEntryTimestamp []byte, inclusionProof *models.InclusionProof) (*Entry, error)

Deprecated: use NewTlogEntry. NewEntry only parses a Rekor v1 entry.

func NewTlogEntry added in v1.1.0

func NewTlogEntry(tle *v1.TransparencyLogEntry) (*Entry, error)

func ParseEntry deprecated

func ParseEntry(protoEntry *v1.TransparencyLogEntry) (entry *Entry, err error)

Deprecated: use ParseTransparencyLogEntry. ParseEntry only parses Rekor v1 type entries. ParseEntry decodes the entry bytes to a specific entry type (types.EntryImpl).

func ParseTransparencyLogEntry added in v1.1.0

func ParseTransparencyLogEntry(tle *v1.TransparencyLogEntry) (*Entry, error)

func (*Entry) Body

func (entry *Entry) Body() any

func (*Entry) GetDssePayloadHash added in v1.2.0

func (entry *Entry) GetDssePayloadHash() (digest []byte, ok bool)

func (*Entry) GetHashedRekordDigest added in v1.2.0

func (entry *Entry) GetHashedRekordDigest() (digest []byte, algorithm string, ok bool)

func (*Entry) HasInclusionPromise

func (entry *Entry) HasInclusionPromise() bool

func (*Entry) HasInclusionProof

func (entry *Entry) HasInclusionProof() bool

func (*Entry) IntegratedTime

func (entry *Entry) IntegratedTime() time.Time

func (*Entry) IsRekorV2 added in v1.2.0

func (entry *Entry) IsRekorV2() bool

func (*Entry) LogIndex

func (entry *Entry) LogIndex() int64

func (*Entry) LogKeyID

func (entry *Entry) LogKeyID() string

func (*Entry) PublicKey

func (entry *Entry) PublicKey() any

func (*Entry) Signature

func (entry *Entry) Signature() []byte

func (*Entry) TransparencyLogEntry added in v1.1.0

func (entry *Entry) TransparencyLogEntry() *v1.TransparencyLogEntry

type RekorPayload

type RekorPayload struct {
	Body           any    `json:"body"`
	IntegratedTime int64  `json:"integratedTime"`
	LogIndex       int64  `json:"logIndex"`
	LogID          string `json:"logID"` //nolint:tagliatelle
}

Jump to

Keyboard shortcuts

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