From 9bbffb9896961612647e883fb9eb1490bb1a1217 Mon Sep 17 00:00:00 2001 From: Miguel Eduardo Gil Biraud Date: Thu, 25 Aug 2016 17:13:40 +0200 Subject: [PATCH] Simplify TLS handling --- main.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/main.go b/main.go index 8a36d9a..e425bb6 100644 --- a/main.go +++ b/main.go @@ -7,7 +7,6 @@ import ( "fmt" "io/ioutil" "log" - "net/http" "os" "strings" "text/template" @@ -15,7 +14,6 @@ import ( "github.com/Luzifer/go_helpers/str" "github.com/Luzifer/rconfig" - "github.com/hashicorp/go-rootcerts" "github.com/hashicorp/vault/api" homedir "github.com/mitchellh/go-homedir" ) @@ -101,14 +99,9 @@ func main() { var err error clientConfig := api.DefaultConfig() + clientConfig.ReadEnvironment() clientConfig.Address = cfg.VaultAddress - tlsConfig := clientConfig.HttpClient.Transport.(*http.Transport).TLSClientConfig - err = rootcerts.ConfigureTLS(tlsConfig, nil) - if err != nil { - log.Fatalf("Could not configure TLS: %s", err) - } - client, err = api.NewClient(clientConfig) if err != nil { log.Fatalf("Could not create Vault client: %s", err)