testutils

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteCertificateFile

func WriteCertificateFile(path string, data ...[]byte) (*os.File, error)

WriteCertificateFile writes the certificate(s) to a file.

Types

type Certificate

type Certificate struct {
	Cert       *x509.Certificate
	Key        *rsa.PrivateKey
	Thumbprint string
	RawCert    []byte
	RawKey     []byte
}

Certificate contains a certificate and RSA key pair.

func CreateCertificate

func CreateCertificate(options ...CreateCertificateOption) (Certificate, error)

CreateCertificate creates a new certificate and RSA key pair.

type CreateCertificateOption

type CreateCertificateOption func(o *CreateCertificateOptions)

CreateCertificateOption is a function that sets options for creating a certificate.

type CreateCertificateOptions

type CreateCertificateOptions struct {
	PKCS1 bool
	PKCS8 bool
}

CreateCertificateOptions contains options for creating a certificate.

Jump to

Keyboard shortcuts

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