Allow self-signed certificates with configuration option in mdmctl (#147)

This commit is contained in:
Jesse Peterson
2017-04-26 09:36:34 -07:00
committed by GitHub
parent 93a8b481e0
commit 2d90d3b69b
5 changed files with 32 additions and 8 deletions

View File

@@ -10,6 +10,7 @@ import (
"strings"
"github.com/go-kit/kit/log"
httptransport "github.com/go-kit/kit/transport/http"
"github.com/micromdm/micromdm/core/apply"
)
@@ -25,7 +26,7 @@ func (cmd *applyCommand) setup() error {
}
cmd.config = cfg
logger := log.NewLogfmtLogger(os.Stderr)
applysvc, err := apply.NewClient(cfg.ServerURL, logger, cfg.APIToken)
applysvc, err := apply.NewClient(cfg.ServerURL, logger, cfg.APIToken, httptransport.SetClient(skipVerifyHTTPClient(cmd.config.SkipVerify)))
if err != nil {
return err
}