From 94e23c7edb15756d906744c5e9e7a4d6c5e1a4d4 Mon Sep 17 00:00:00 2001 From: Knic Knic Date: Sat, 25 Apr 2020 22:59:52 -0700 Subject: [PATCH] fix certpath generation for windows --- cert/cert.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cert/cert.go b/cert/cert.go index bdf4834..084a5f7 100644 --- a/cert/cert.go +++ b/cert/cert.go @@ -33,7 +33,7 @@ import ( "math" "math/big" "net" - "path" + "path/filepath" "strings" "time" @@ -161,8 +161,8 @@ func GenerateSelfSignedCertKeyWithFixtures(host string, alternateIPs []net.IP, a maxAge := time.Hour * 24 * 365 // one year self-signed certs baseName := fmt.Sprintf("%s_%s_%s", host, strings.Join(ipsToStrings(alternateIPs), "-"), strings.Join(alternateDNS, "-")) - certFixturePath := path.Join(fixtureDirectory, baseName+".crt") - keyFixturePath := path.Join(fixtureDirectory, baseName+".key") + certFixturePath := filepath.Join(fixtureDirectory, baseName+".crt") + keyFixturePath := filepath.Join(fixtureDirectory, baseName+".key") if len(fixtureDirectory) > 0 { cert, err := ioutil.ReadFile(certFixturePath) if err == nil {