Skip to content

Commit e7de96e

Browse files
authored
Merge pull request kubernetes#90493 from KnicKnic/cert_path
fix cert path generation in windows
2 parents 7f744be + a381e1b commit e7de96e

File tree

1 file changed

+3
-3
lines changed
  • staging/src/k8s.io/client-go/util/cert

1 file changed

+3
-3
lines changed

staging/src/k8s.io/client-go/util/cert/cert.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
"io/ioutil"
2929
"math/big"
3030
"net"
31-
"path"
31+
"path/filepath"
3232
"strings"
3333
"time"
3434

@@ -96,8 +96,8 @@ func GenerateSelfSignedCertKeyWithFixtures(host string, alternateIPs []net.IP, a
9696
maxAge := time.Hour * 24 * 365 // one year self-signed certs
9797

9898
baseName := fmt.Sprintf("%s_%s_%s", host, strings.Join(ipsToStrings(alternateIPs), "-"), strings.Join(alternateDNS, "-"))
99-
certFixturePath := path.Join(fixtureDirectory, baseName+".crt")
100-
keyFixturePath := path.Join(fixtureDirectory, baseName+".key")
99+
certFixturePath := filepath.Join(fixtureDirectory, baseName+".crt")
100+
keyFixturePath := filepath.Join(fixtureDirectory, baseName+".key")
101101
if len(fixtureDirectory) > 0 {
102102
cert, err := ioutil.ReadFile(certFixturePath)
103103
if err == nil {

0 commit comments

Comments
 (0)