Help us shape the future of Go! Take the 2026 Go Developer Survey

testutils

package
v1.22.7 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilesToBytes

func FilesToBytes(files ...string) ([][]byte, error)

FilesToBytes reads the given n files and returns an array of the contents

func MustSelfSignedPEM added in v1.20.14

func MustSelfSignedPEM() (keyPEM, certPEM, caPEM []byte)

MustSelfSignedPEM returns a valid matching RSA private key, leaf certificate, and CA certificate (PEM-encoded). The CA PEM is the same as the leaf (self-signed) for test simplicity.

func MustSelfSignedPEMRotation1 added in v1.20.14

func MustSelfSignedPEMRotation1() (keyPEM, certPEM, caPEM []byte)

MustSelfSignedPEMRotation1 returns a second distinct self-signed key/cert/CA for rotation tests.

func MustSelfSignedPEMRotation2 added in v1.20.14

func MustSelfSignedPEMRotation2() (keyPEM, certPEM, caPEM []byte)

MustSelfSignedPEMRotation2 returns a third distinct self-signed key/cert/CA for rotation tests.

Types

This section is empty.

Jump to

Keyboard shortcuts

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