chore: add custom ca trust

This commit is contained in:
Skyxim
2023-02-25 22:01:20 +08:00
parent a3b8c9c233
commit f565edd76d
4 changed files with 28 additions and 42 deletions

View File

@ -169,9 +169,11 @@ func updateExperimental(c *config.Config) {
}
func preUpdateExperimental(c *config.Config) {
CTLS.AddCertificate(c.TLS.PrivateKey, c.TLS.Certificate)
CTLS.ResetCertificate()
for _, c := range c.TLS.CustomTrustCert {
CTLS.AddCertificate(c.PrivateKey, c.Certificate)
if err := CTLS.AddCertificate(c); err != nil {
log.Warnln("%s\nadd error: %s", c, err.Error())
}
}
}