Merge pull request #1402 from auhlig/nilpointerfix
fix error when cert or key is nil
This commit is contained in:
commit
5a24f4d3bd
1 changed files with 3 additions and 0 deletions
|
@ -81,6 +81,9 @@ func (ic *GenericController) getPemCertificate(secretName string) (*ingress.SSLC
|
|||
|
||||
var s *ingress.SSLCert
|
||||
if okcert && okkey {
|
||||
if cert == nil || key == nil {
|
||||
return nil, fmt.Errorf("error retrieving cert or key from secret %v: %v", secretName, err)
|
||||
}
|
||||
s, err = ssl.AddOrUpdateCertAndKey(nsSecName, cert, key, ca)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unexpected error creating pem file %v", err)
|
||||
|
|
Loading…
Reference in a new issue