avoid incorrect short-circuit of client-ca setup

pull/6/head
Jordan Liggitt 2017-01-22 14:50:42 -05:00
parent 093ceb9528
commit c6c0b8518e
No known key found for this signature in database
GPG Key ID: 24E7ADF9A3B42012
1 changed files with 3 additions and 2 deletions

View File

@ -298,7 +298,7 @@ func (s *BuiltInAuthenticationOptions) ToAuthenticationConfig() authenticator.Au
}
func (o *BuiltInAuthenticationOptions) Apply(c *genericapiserver.Config) error {
if o == nil || o.PasswordFile == nil {
if o == nil {
return nil
}
@ -316,7 +316,8 @@ func (o *BuiltInAuthenticationOptions) Apply(c *genericapiserver.Config) error {
}
}
c.SupportsBasicAuth = len(o.PasswordFile.BasicAuthFile) > 0
c.SupportsBasicAuth = o.PasswordFile != nil && len(o.PasswordFile.BasicAuthFile) > 0
return nil
}