From 0ad1a8d69830df7eb7452c6435820ae2cec5754d Mon Sep 17 00:00:00 2001 From: Renan DelValle Date: Tue, 29 May 2018 11:16:05 -0700 Subject: [PATCH] Separating CA certificate path and client key and cert addition to options. --- examples/client.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/client.go b/examples/client.go index e91cc79..b2a57e5 100644 --- a/examples/client.go +++ b/examples/client.go @@ -107,8 +107,12 @@ func main() { clientOptions = append(clientOptions, realis.SchedulerUrl(url)) } - if clientKey != "" && clientCert != "" && caCertsPath != "" { - clientOptions = append(clientOptions, realis.Certspath(caCertsPath), realis.ClientCerts(clientKey, clientCert)) + if caCertsPath != "" { + clientOptions = append(clientOptions, realis.Certspath(caCertsPath)) + } + + if clientKey != "" && clientCert != "" { + clientOptions = append(clientOptions, realis.ClientCerts(clientKey, clientCert)) } r, err = realis.NewRealisClient(clientOptions...)