tlsconf

package
v0.0.0-...-67aac8e Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateClient

func CreateClient(clientKeyFile, clientCertFile, serverRootCA string) *tls.Config

CreateClient ... if serverRootCA is empty, the client will will not check the root CA of client.

func CreateClientBytes

func CreateClientBytes(clientKeyFile, clientCertFile, serverRootCA []byte) *tls.Config

CreateClientBytes ...

func CreateClientBytesE

func CreateClientBytesE(clientKeyFile, clientCertFile, serverRootCA []byte) (*tls.Config, error)

CreateClientBytesE ...

func CreateClientE

func CreateClientE(clientKeyFile, clientCertFile, serverRootCA string) (*tls.Config, error)

CreateClientE ...

func CreateServer

func CreateServer(serverKeyFile, serverCertFile, clientRootCA string) *tls.Config

CreateServer ...

func CreateServerBytes

func CreateServerBytes(serverKeyFile, serverCertFile, clientRootCA []byte) *tls.Config

CreateServerBytes ....

func CreateServerBytesE

func CreateServerBytesE(serverKeyFile, serverCertFile, clientRootCA []byte) (*tls.Config, error)

CreateServerBytesE ...

func CreateServerE

func CreateServerE(serverKeyFile, serverCertFile, clientRootCA string) (*tls.Config, error)

CreateServerE ...

func NewHTTPSTestServer

func NewHTTPSTestServer(handler http.Handler, serverCertFile, serverKeyFile, clientRootCA string) *httptest.Server

NewHTTPSTestServer news a test https server.

func TLSGenAll

func TLSGenAll(path, host string) error

TLSGenAll ...

func TLSGenClientFiles

func TLSGenClientFiles(path, rootKey, rootPem, outKey, outPem string) error

TLSGenClientFiles ...

func TLSGenClientPem

func TLSGenClientPem(rootCA *x509.Certificate, rootPrivate crypto.PrivateKey) (*ecdsa.PrivateKey, []byte, error)

TLSGenClientPem ...

func TLSGenRootFiles

func TLSGenRootFiles(path, outKey, outPem string) error

TLSGenRootFiles ...

func TLSGenRootPem

func TLSGenRootPem() (*x509.Certificate, *ecdsa.PrivateKey, []byte, error)

TLSGenRootPem ...

func TLSGenServerFiles

func TLSGenServerFiles(path, rootKey, rootPem, host, outKey, outPem string) error

TLSGenServerFiles ...

func TLSGenServerPem

func TLSGenServerPem(host string, ca *x509.Certificate, key crypto.PrivateKey) (*ecdsa.PrivateKey, []byte, error)

TLSGenServerPem ...

func TLSLoadKeyPair

func TLSLoadKeyPair(path string, rootPem string, rootKey string) (crypto.PrivateKey, *x509.Certificate, error)

TLSLoadKeyPair ...

func TLSLoadPerm

func TLSLoadPerm(rootCAFile []byte) (*x509.Certificate, error)

TLSLoadPerm ...

func TLSLoadPermFile

func TLSLoadPermFile(rootCAFile string) (*x509.Certificate, error)

TLSLoadPermFile ...

Types

This section is empty.

Jump to

Keyboard shortcuts

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