add support for linux network namespace

This commit is contained in:
ginuerzh
2024-06-21 23:38:18 +08:00
parent 15f28c667a
commit 2ae0462822
9 changed files with 127 additions and 8 deletions

View File

@ -3,7 +3,7 @@ package tls
import (
"crypto/tls"
"crypto/x509"
"errors"
"fmt"
"net"
"os"
"strings"
@ -234,7 +234,7 @@ func loadCA(caFile string) (cp *x509.CertPool, err error) {
return nil, err
}
if !cp.AppendCertsFromPEM(data) {
return nil, errors.New("AppendCertsFromPEM failed")
return nil, fmt.Errorf("loadCA %s: AppendCertsFromPEM failed", caFile)
}
return
}