Update to match upstream changes

This commit is contained in:
Bryan Boreham committed 2018-04-27 14:34:48 +01:00
1 parent 4da998ab45
commit 847046a225
5 files changed
+26 -21

No files matched your search

+18 -18
View File
@@ -41,15 +41,15 @@ func main() {
log.Fatalf("The client key already exists. Please remove it or specify a different key/cert.")
}
err = cert.GenerateCert(
[]string{""},
clientCertPath,
clientKeyPath,
caCertPath,
caKeyPath,
org,
bits,
)
err = cert.GenerateCert(&cert.Options{
Hosts: []string{""},
CertFile: clientCertPath,
KeyFile: clientKeyPath,
CAFile: caCertPath,
CAKeyFile: caKeyPath,
Org: org,
Bits: bits,
})
if err != nil {
log.Fatalf("Error generating client certificate: %s", err)
}
@@ -64,15 +64,15 @@ func main() {
if _, err := os.Stat(serverCertPath); os.IsNotExist(err) {
log.Printf("Creating server certificate: %s", serverCertPath)
err = cert.GenerateCert(
[]string{ip},
serverCertPath,
serverKeyPath,
caCertPath,
caKeyPath,
org,
bits,
)
err = cert.GenerateCert(&cert.Options{
Hosts: []string{ip},
CertFile: serverCertPath,
KeyFile: serverKeyPath,
CAFile: caCertPath,
CAKeyFile: caKeyPath,
Org: org,
Bits: bits,
})
if err != nil {
log.Fatalf("error generating server cert: %s", err)
}