No more funny business with InsecureSkipVerify

This commit is contained in:
Sasha Koshka
2023-05-27 03:57:27 -04:00
parent 9025844212
commit 5e37c4bb8f
8 changed files with 28 additions and 46 deletions

View File

@@ -90,8 +90,8 @@ func (mount *HTTP) Run () (err error) {
// NewHTTP creates a very basic https:// mount with the specified name and
// description.
func NewHTTP (name, description string) HTTP {
return HTTP { Mount: M(name, description) }
func NewHTTP (name, description, host, path string) *HTTP {
return &HTTP { Mount: M(name, description, host, path) }
}
func (mount *HTTP) send (message protocol.Message) (err error) {

View File

@@ -11,8 +11,10 @@ import "encoding/base64"
import "hnakra/protocol"
// M creates a very basic MountConfig with the specified name and description.
func M (name, description string) MountConfig {
func M (name, description, host, path string) MountConfig {
return MountConfig {
Host: host,
Path: path,
Name: name,
Description: description,
}
@@ -78,7 +80,10 @@ type MountConfig struct {
// Maximum length: 255 bytes
Key []byte
// TLSConfig is an optional TLS configuration.
// TLSConfig is an optional TLS configuration. If you are looking to
// set InsecureSkipVerify to false, consider instead setting the
// environment variables $SSL_CERT_FILE or $SSL_CERT_DIR to point toward
// a custom root certificate.
TLSConfig *tls.Config
}