certificates

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestCertificates

type TestCertificates struct {
	CACertificate       string
	InstanceCertificate string
	InstanceKey         string

	PathToCACertificate       string
	PathToInstanceCertificate string
	PathToInstanceKey         string
	// contains filtered or unexported fields
}

func Generate

func Generate(instanceID, orgID, spaceID, appID, ipAddress string) (*TestCertificates, error)

Generate is a convenience method for testing. It creates a group of test certificates with the client certificate reflecting the given values. Close() should be called when done to immediately delete the three temporary files it has created.

Usage:

testCerts, err := certificates.Generate(...)

if err != nil {
		...
}

defer func(){
		if err := testCerts.Close(); err != nil {
			...
		}
}()

func (*TestCertificates) Close

func (e *TestCertificates) Close() error

type TestMTLSCertificates added in v0.8.0

type TestMTLSCertificates struct {
	SigningCA         string
	PathToSigningCA   string
	Certificate       string
	PathToCertificate string
	PrivateKey        string
	PathToPrivateKey  string
	// contains filtered or unexported fields
}

func GenerateMTLS added in v0.8.0

func GenerateMTLS() (*TestMTLSCertificates, error)

func (*TestMTLSCertificates) Close added in v0.8.0

func (e *TestMTLSCertificates) Close() error

Jump to

Keyboard shortcuts

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