mitmcert

package
v0.9.8 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: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ServerName = "recorderproxy.invalid"

Variables

This section is empty.

Functions

func Generate

func Generate(now time.Time) (certPEM, keyPEM []byte, err error)

Generate creates an ECDSA P-256 self-signed server leaf.

func Write

func Write(certFile, keyFile string, now time.Time) error

Write atomically replaces the certificate and private-key files.

Types

type Identity

type Identity struct {
	// contains filtered or unexported fields
}

Identity is an immutable TLS server identity shared by proxy listeners.

func LoadIdentity

func LoadIdentity(certFile, keyFile string) (*Identity, error)

LoadIdentity loads and validates a non-expired TLS server identity.

func ParseIdentity

func ParseIdentity(certPEM, keyPEM []byte) (*Identity, error)

ParseIdentity validates a PEM-encoded TLS server identity.

func (*Identity) Certificate

func (i *Identity) Certificate() *x509.Certificate

Certificate returns the parsed public certificate for identity checks.

func (*Identity) TLSCertificate

func (i *Identity) TLSCertificate() *tls.Certificate

TLSCertificate returns the immutable key pair used by TLS listeners.

Jump to

Keyboard shortcuts

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