mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
fix cert path generation in windows
This commit is contained in:
parent
7f744be14e
commit
a381e1b04e
@ -28,7 +28,7 @@ import (
|
|||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"math/big"
|
"math/big"
|
||||||
"net"
|
"net"
|
||||||
"path"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@ -96,8 +96,8 @@ func GenerateSelfSignedCertKeyWithFixtures(host string, alternateIPs []net.IP, a
|
|||||||
maxAge := time.Hour * 24 * 365 // one year self-signed certs
|
maxAge := time.Hour * 24 * 365 // one year self-signed certs
|
||||||
|
|
||||||
baseName := fmt.Sprintf("%s_%s_%s", host, strings.Join(ipsToStrings(alternateIPs), "-"), strings.Join(alternateDNS, "-"))
|
baseName := fmt.Sprintf("%s_%s_%s", host, strings.Join(ipsToStrings(alternateIPs), "-"), strings.Join(alternateDNS, "-"))
|
||||||
certFixturePath := path.Join(fixtureDirectory, baseName+".crt")
|
certFixturePath := filepath.Join(fixtureDirectory, baseName+".crt")
|
||||||
keyFixturePath := path.Join(fixtureDirectory, baseName+".key")
|
keyFixturePath := filepath.Join(fixtureDirectory, baseName+".key")
|
||||||
if len(fixtureDirectory) > 0 {
|
if len(fixtureDirectory) > 0 {
|
||||||
cert, err := ioutil.ReadFile(certFixturePath)
|
cert, err := ioutil.ReadFile(certFixturePath)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user