aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules/caddyhttp/reverseproxy/httptransport.go
diff options
context:
space:
mode:
authorMatthew Holt <[email protected]>2020-01-22 09:35:03 -0700
committerMatthew Holt <[email protected]>2020-01-22 09:35:03 -0700
commit6b6cd934d02476e3d71b85edbb0acf58cf299fec (patch)
tree20c16058e13d77642d1824ac7f5167c3097e479c /modules/caddyhttp/reverseproxy/httptransport.go
parent5b878d5bd36a6628095997c4f32e7df5366621f7 (diff)
downloadcaddy-6b6cd934d02476e3d71b85edbb0acf58cf299fec.tar.gz
caddy-6b6cd934d02476e3d71b85edbb0acf58cf299fec.zip
reverseproxy: Fix casing of RootCAPEMFiles
Diffstat (limited to 'modules/caddyhttp/reverseproxy/httptransport.go')
-rw-r--r--modules/caddyhttp/reverseproxy/httptransport.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/caddyhttp/reverseproxy/httptransport.go b/modules/caddyhttp/reverseproxy/httptransport.go
index 044bb8380..fa73f9d7e 100644
--- a/modules/caddyhttp/reverseproxy/httptransport.go
+++ b/modules/caddyhttp/reverseproxy/httptransport.go
@@ -178,7 +178,7 @@ func (h HTTPTransport) Cleanup() error {
type TLSConfig struct {
RootCAPool []string `json:"root_ca_pool,omitempty"`
// Added to the same pool as above, but brought in from files
- RootCAPemFiles []string `json:"root_ca_pem_files,omitempty"`
+ RootCAPEMFiles []string `json:"root_ca_pem_files,omitempty"`
// TODO: Should the client cert+key config use caddytls.CertificateLoader modules?
ClientCertificateFile string `json:"client_certificate_file,omitempty"`
ClientCertificateKeyFile string `json:"client_certificate_key_file,omitempty"`
@@ -208,7 +208,7 @@ func (t TLSConfig) MakeTLSClientConfig() (*tls.Config, error) {
}
// trusted root CAs
- if len(t.RootCAPool) > 0 || len(t.RootCAPemFiles) > 0 {
+ if len(t.RootCAPool) > 0 || len(t.RootCAPEMFiles) > 0 {
rootPool := x509.NewCertPool()
for _, encodedCACert := range t.RootCAPool {
caCert, err := decodeBase64DERCert(encodedCACert)
@@ -217,7 +217,7 @@ func (t TLSConfig) MakeTLSClientConfig() (*tls.Config, error) {
}
rootPool.AddCert(caCert)
}
- for _, pemFile := range t.RootCAPemFiles {
+ for _, pemFile := range t.RootCAPEMFiles {
pemData, err := ioutil.ReadFile(pemFile)
if err != nil {
return nil, fmt.Errorf("failed reading ca cert: %v", err)