testcerts

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package testcerts generates self-signed X.509 certificates for tests that exercise certificate parsing and expiry logic. It exists so certificate generation is written once and shared by every scanner test that needs a PEM bundle with a controlled expiry.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PEMWithExpiry

func PEMWithExpiry(cn string, notAfter time.Time) ([]byte, error)

PEMWithExpiry returns a PEM-encoded self-signed certificate whose subject common name is cn and whose NotAfter is notAfter. The key is discarded; the certificate is only for parsing, never for a live handshake.

Types

This section is empty.

Jump to

Keyboard shortcuts

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