No more funny business with InsecureSkipVerify
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user