tls

package
v1.20.117 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: Zlib Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCertificate added in v1.20.109

func GetCertificate(t *Tls) (tls.Certificate, *x509.CertPool, error)

func GetServerPubKey added in v1.20.109

func GetServerPubKey(pk *ServerPubKey) (*rsa.PublicKey, error)

Types

type P12 added in v1.20.109

type P12 struct {
	Password string
}

func (*P12) ReadCertificate added in v1.20.109

func (p *P12) ReadCertificate(certFile, keyFile, pkcs12File any) (cert tls.Certificate, err error)

type ServerPubKey added in v1.20.109

type ServerPubKey struct {
	Key     string `json:"Key" yaml:"Key" xml:"Key"`
	PemFile string `json:"pemFile" yaml:"pemFile" xml:"pemFile"`
}

type Tls

type Tls struct {
	Key      string `json:"key" yaml:"key" xml:"key"` //true,false,skip-verify,preferred
	CaFile   string `json:"caFile" yaml:"caFile" xml:"caFile"`
	CertFile string `json:"certFile" yaml:"certFile" xml:"certFile"`
	KeyFile  string `json:"keyFile" yaml:"keyFile" xml:"keyFile"`
}

func (*Tls) GetCredential

func (t *Tls) GetCredential() (tls.Certificate, *x509.CertPool, error)

Jump to

Keyboard shortcuts

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