devpki

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: Apache-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package devpki generates ephemeral keys, certificates and a local RFC 3161 timestamp authority for tests and synthetic fixtures. Nothing it creates is persisted or trusted outside the process that created it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TSAHandler

func TSAHandler(tsa Cert, now func() time.Time) http.Handler

TSAHandler serves RFC 3161 requests signed by the given TSA certificate. now supplies genTime, so tests can control it.

Types

type Cert

type Cert struct {
	// Cert is the parsed certificate.
	Cert *x509.Certificate
	// Key is the private key matching Cert.
	Key crypto.Signer
}

Cert is a certificate with its private key.

type Set

type Set struct {
	// SealRoot is the CA that issued Seal.
	SealRoot Cert
	// Seal is the document-sealing certificate.
	Seal Cert
	// TSARoot is the CA that issued TSA.
	TSARoot Cert
	// TSA is the timestamp authority certificate.
	TSA Cert
	// KeyListRoot signs key lists; verifiers pin its thumbprint.
	KeyListRoot *ecdsa.PrivateKey
	// EvidenceKey signs evidence. It is the same key as Seal.Key, as in production.
	EvidenceKey *ecdsa.PrivateKey
}

Set is a complete development PKI.

func New

func New(now time.Time) (*Set, error)

New creates a full development PKI valid from now-1h for one year. Every key is P-256, as in production (ADR 0008).

Jump to

Keyboard shortcuts

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