devkeys

package
v0.0.0-...-9f6392c Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package devkeys provides test-only pregenerated and signed root and signer keys.

Index

Constants

This section is empty.

Variables

View Source
var (
	// RootPEM contains a PEM-encoded private key generated by the bootstrapping process.
	//go:embed root.pem
	RootPEM []byte

	// RootCert contains a DER-encoded x509 certificate of RootPEM, self-signed as a CA.
	//go:embed root.crt
	RootCert []byte

	// PrimarySigningKeyPEM contains a PEM-encoded private key for signing binaries, generated by the
	// bootstrapping process.
	//go:embed primarySigningKey.pem
	PrimarySigningKeyPEM []byte

	// PrimarySigningKeyCert contains a DER-encoded root-signed x509 certificate for the signer key.
	//go:embed primarySigningKey.crt
	PrimarySigningKeyCert []byte

	// KeyManifest contains a textproto manifest with paths to and names of the root and primary keys,
	// and their certs.
	//go:embed keyManifest.textproto
	KeyManifest []byte
)

Functions

func DumpTo

func DumpTo(opts *Options) error

DumpTo writes the embedded files to a directory so they can be used for tests that need file paths.

Types

type Options

type Options struct {
	KeyDir                       string
	CertRoot                     string
	CertDir                      string
	Bucket                       string
	RootKeyVersionName           string
	PrimarySigningKeyVersionName string
}

Options provides parameters to where to write dev keys and certificate files, and how to populate the keyManifest.textproto.

Jump to

Keyboard shortcuts

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