testcert

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package testcert generates throwaway TLS material for tests.

The public tree deliberately ships no committed private key: secret scanners flag any tracked PEM private key, regardless of it being a test fixture. Tests that need a certificate/key pair call Generate and get a freshly created, self-signed pair inside a caller supplied directory (typically t.TempDir()), which disappears with the test run.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(dir, domain string) (keyPath, certPath string, err error)

Generate writes a self-signed certificate and its private key for domain into dir and returns both paths.

Types

This section is empty.

Jump to

Keyboard shortcuts

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