Enabling per-location proxy-ssl parameters, so locations of the same server but with own unique Ingress definitions can have different SSL configs
This commit is contained in:
parent
a6815c36aa
commit
37fe9c9876
5 changed files with 29 additions and 18 deletions
|
|
@ -104,17 +104,19 @@ func (s *k8sStore) getPemCertificate(secretName string) (*ingress.SSLCert, error
|
|||
return nil, fmt.Errorf("unexpected error creating SSL Cert: %v", err)
|
||||
}
|
||||
|
||||
path, err := ssl.StoreSSLCertOnDisk(nsSecName, sslCert)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error while storing certificate and key: %v", err)
|
||||
}
|
||||
|
||||
sslCert.PemFileName = path
|
||||
|
||||
if len(ca) > 0 {
|
||||
caCert, err := ssl.CheckCACert(ca)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("parsing CA certificate: %v", err)
|
||||
}
|
||||
|
||||
path, err := ssl.StoreSSLCertOnDisk(nsSecName, sslCert)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error while storing certificate and key: %v", err)
|
||||
}
|
||||
|
||||
sslCert.CACertificate = caCert
|
||||
sslCert.CAFileName = path
|
||||
sslCert.CASHA = file.SHA1(path)
|
||||
|
|
|
|||
|
|
@ -843,6 +843,7 @@ func (s *k8sStore) GetAuthCertificate(name string) (*resolver.AuthSSLCert, error
|
|||
CASHA: cert.CASHA,
|
||||
CRLFileName: cert.CRLFileName,
|
||||
CRLSHA: cert.CRLSHA,
|
||||
PemFileName: cert.PemFileName,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue