Separating CA certificate path and client key and cert addition to options.

This commit is contained in:
Renan DelValle 2018-05-29 11:16:05 -07:00
parent bafea8b667
commit 0ad1a8d698
No known key found for this signature in database
GPG key ID: C240AD6D6F443EC9

View file

@ -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...)