TUN-2640: Users can configure per-origin config. Unify single-rule CLI

flow with multi-rule config file code.
This commit is contained in:
Adam Chalmers
2020-10-15 16:41:03 -05:00
parent ea71b78e6d
commit e933ef9e1a
13 changed files with 1210 additions and 481 deletions

View File

@@ -65,10 +65,9 @@ func (cr *CertReloader) LoadCert() error {
return nil
}
func LoadOriginCA(c *cli.Context, logger logger.Service) (*x509.CertPool, error) {
func LoadOriginCA(originCAPoolFilename string, logger logger.Service) (*x509.CertPool, error) {
var originCustomCAPool []byte
originCAPoolFilename := c.String(OriginCAPoolFlag)
if originCAPoolFilename != "" {
var err error
originCustomCAPool, err = ioutil.ReadFile(originCAPoolFilename)