Documentation
¶
Index ¶
- func CreateClient(clientKeyFile, clientCertFile, serverRootCA string) *tls.Config
- func CreateClientBytes(clientKeyFile, clientCertFile, serverRootCA []byte) *tls.Config
- func CreateClientBytesE(clientKeyFile, clientCertFile, serverRootCA []byte) (*tls.Config, error)
- func CreateClientE(clientKeyFile, clientCertFile, serverRootCA string) (*tls.Config, error)
- func CreateServer(serverKeyFile, serverCertFile, clientRootCA string) *tls.Config
- func CreateServerBytes(serverKeyFile, serverCertFile, clientRootCA []byte) *tls.Config
- func CreateServerBytesE(serverKeyFile, serverCertFile, clientRootCA []byte) (*tls.Config, error)
- func CreateServerE(serverKeyFile, serverCertFile, clientRootCA string) (*tls.Config, error)
- func NewHTTPSTestServer(handler http.Handler, serverCertFile, serverKeyFile, clientRootCA string) *httptest.Server
- func SkipHostnameVerification(c *tls.Config)
- func TLSGenAll(path, host string) error
- func TLSGenClientFiles(path, rootKey, rootPem, outKey, outPem string) error
- func TLSGenClientPem(rootCA *x509.Certificate, rootPrivate crypto.PrivateKey) (*ecdsa.PrivateKey, []byte, error)
- func TLSGenRootFiles(path, outKey, outPem string) error
- func TLSGenRootPem() (*x509.Certificate, *ecdsa.PrivateKey, []byte, error)
- func TLSGenServerFiles(path, rootKey, rootPem, host, outKey, outPem string) error
- func TLSGenServerPem(host string, ca *x509.Certificate, key crypto.PrivateKey) (*ecdsa.PrivateKey, []byte, error)
- func TLSLoadKeyPair(path string, rootPem string, rootKey string) (crypto.PrivateKey, *x509.Certificate, error)
- func TLSLoadPerm(rootCAFile []byte) (*x509.Certificate, error)
- func TLSLoadPermFile(rootCAFile string) (*x509.Certificate, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateClient ¶
CreateClient ... if serverRootCA is empty, the client will will not check the root CA of client.
func CreateClientBytes ¶
CreateClientBytes ...
func CreateClientBytesE ¶
CreateClientBytesE ...
func CreateClientE ¶
CreateClientE ...
func CreateServer ¶
CreateServer ...
func CreateServerBytes ¶
CreateServerBytes ....
func CreateServerBytesE ¶
CreateServerBytesE ...
func CreateServerE ¶
CreateServerE ...
func NewHTTPSTestServer ¶
func NewHTTPSTestServer(handler http.Handler, serverCertFile, serverKeyFile, clientRootCA string) *httptest.Server
NewHTTPSTestServer news a test https server.
func SkipHostnameVerification ¶
SkipHostnameVerification ... nolint https://github.com/digitalbitbox/bitbox-wallet-app/blob/b04bd07852d5b37939da75b3555b5a1e34a976ee/backend/coins/btc/electrum/electrum.go#L76-L111
func TLSGenClientFiles ¶
TLSGenClientFiles ...
func TLSGenClientPem ¶
func TLSGenClientPem(rootCA *x509.Certificate, rootPrivate crypto.PrivateKey) (*ecdsa.PrivateKey, []byte, error)
TLSGenClientPem ...
func TLSGenRootPem ¶
func TLSGenRootPem() (*x509.Certificate, *ecdsa.PrivateKey, []byte, error)
TLSGenRootPem ...
func TLSGenServerFiles ¶
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 TLSLoadPermFile ¶
func TLSLoadPermFile(rootCAFile string) (*x509.Certificate, error)
TLSLoadPermFile ...
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.