Skip to content

Commit

Permalink
Add comment how we read the cert-file
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcel Ludwig committed Mar 21, 2022
1 parent 32f81a2 commit 51a62ca
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions command/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ func (r *Run) Execute(args Args, config *config.Couper, logEntry *logrus.Entry)
return nil
}

// readCertificateFile reads given file bytes and PEM decodes the certificates the
// same way x509.CertPool.AppendCertsFromPEM does.
// AppendCertsFromPEM method will be used on backend transport creation.
func readCertificateFile(file string) ([]byte, error) {
cert, err := ioutil.ReadFile(file)
if err != nil {
Expand Down

0 comments on commit 51a62ca

Please sign in to comment.