certs

package
v0.0.0-...-075ee23 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Certificate

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

Certificate is a manager for a certificate. Is it intended to be used as a client OR server but not both at the same time.

func NewCertificate

func NewCertificate(caCertFile, certFile, keyFile string) (*Certificate, error)

NewCertificate generates a client agnostic certificate manager

func NewClientCertificate

func NewClientCertificate(caCertFile, certFile, keyFile string) (*Certificate, error)

NewClientCertificate generates a new client certificate

func NewServerCertificate

func NewServerCertificate(caCertFile, certFile, keyFile string) (*Certificate, error)

NewCertificate generates a new certificate holder

func (*Certificate) CreatePool

func (c *Certificate) CreatePool() error

func (*Certificate) GenerateClientCert

func (c *Certificate) GenerateClientCert() error

GenerateClientCert generates the client certificate

func (*Certificate) GenerateServerCert

func (c *Certificate) GenerateServerCert() error

GenerateServerCert generates the server certificate

func (*Certificate) GetClientCredentials

func (c *Certificate) GetClientCredentials() credentials.TransportCredentials

GenerateClientCert generates the client tls certificate

func (*Certificate) GetServerCredentials

func (c *Certificate) GetServerCredentials() credentials.TransportCredentials

GetCredentials for the server

func (*Certificate) IsEmpty

func (c *Certificate) IsEmpty() bool

IsEmpty determines if the certificate is empty

func (*Certificate) Validate

func (c *Certificate) Validate() error

Validate all fields are defined

Jump to

Keyboard shortcuts

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