|
|
@ -98,12 +98,12 @@ func (f *factory) New(ctx context.Context, cfg driver.InitConfig) (driver.Driver
|
|
|
|
if tls.caCert == "" {
|
|
|
|
if tls.caCert == "" {
|
|
|
|
missing = append(missing, "cacert")
|
|
|
|
missing = append(missing, "cacert")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if tls.cert == "" {
|
|
|
|
if tls.cert != "" && tls.key == "" {
|
|
|
|
missing = append(missing, "cert")
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if tls.key == "" {
|
|
|
|
|
|
|
|
missing = append(missing, "key")
|
|
|
|
missing = append(missing, "key")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if tls.key != "" && tls.cert == "" {
|
|
|
|
|
|
|
|
missing = append(missing, "cert")
|
|
|
|
|
|
|
|
}
|
|
|
|
if len(missing) > 0 {
|
|
|
|
if len(missing) > 0 {
|
|
|
|
return nil, errors.Errorf("tls enabled, but missing keys %s", strings.Join(missing, ", "))
|
|
|
|
return nil, errors.Errorf("tls enabled, but missing keys %s", strings.Join(missing, ", "))
|
|
|
|
}
|
|
|
|
}
|
|
|
|