fix: console should trust itself with its own public.crt (#827)
This commit is contained in:
@@ -325,5 +325,9 @@ func GetAllCertificatesAndCAs() (*x509.CertPool, []*x509.Certificate, *xcerts.Ma
|
||||
if rootCAs == nil {
|
||||
rootCAs = &x509.CertPool{}
|
||||
}
|
||||
// Add the public crts as part of root CAs to trust self.
|
||||
for _, publicCrt := range publicCerts {
|
||||
rootCAs.AddCert(publicCrt)
|
||||
}
|
||||
return rootCAs, publicCerts, certsManager, nil
|
||||
}
|
||||
|
||||
@@ -147,11 +147,6 @@ func configureAPI(api *operations.ConsoleAPI) http.Handler {
|
||||
|
||||
// The TLS configuration before HTTPS server starts.
|
||||
func configureTLS(tlsConfig *tls.Config) {
|
||||
// Add the global public crts as part of global root CAs
|
||||
for _, publicCrt := range GlobalPublicCerts {
|
||||
GlobalRootCAs.AddCert(publicCrt)
|
||||
}
|
||||
|
||||
tlsConfig.RootCAs = GlobalRootCAs
|
||||
tlsConfig.GetCertificate = GlobalTLSCertsManager.GetCertificate
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user