ctonly

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2025 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Overview

Package ctonly has support for CT Tiles API.

This code should not be reused outside of CT. Most of this code came from Filippo's Sunlight implementation of https://c2sp.org/ct-static-api.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Timestamp uint64
	IsPrecert bool
	// Certificate holds different things depending on whether the entry represents a Certificate or a Precertificate submission:
	//   - IsPrecert == false: the bytes here are the x509 certificate submitted for logging.
	//   - IsPrecert == true: the bytes here are the TBS certificate extracted from the submitted precert.
	Certificate []byte
	// Precertificate holds the precertificate to be logged, only used when IsPrecert is true.
	Precertificate    []byte
	IssuerKeyHash     []byte
	FingerprintsChain [][32]byte
}

Entry represents a CT log entry.

func (Entry) Identity

func (c Entry) Identity() []byte

func (Entry) LeafData

func (c Entry) LeafData(idx uint64) []byte

LeafData returns the data which should be added to an entry bundle for this entry.

Note that this will include data which IS NOT directly committed to by the entry's MerkleLeafHash.

func (Entry) MerkleLeafHash

func (c Entry) MerkleLeafHash(leafIndex uint64) []byte

MerkleLeafHash returns the RFC6962 leaf hash for this entry.

Note that we embed an SCT extension which captures the index of the entry in the log according to the mechanism specified in https://c2sp.org/ct-static-api.

func (*Entry) MerkleTreeLeaf

func (e *Entry) MerkleTreeLeaf(idx uint64) []byte

MerkleTreeLeaf returns a RFC 6962 MerkleTreeLeaf.

Note that we embed an SCT extension which captures the index of the entry in the log according to the mechanism specified in https://c2sp.org/ct-static-api.

Jump to

Keyboard shortcuts

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