Skip to content

Commit

Permalink
Chore: Let CA read following homeDir
Browse files Browse the repository at this point in the history
  • Loading branch information
xishang0128 committed Apr 20, 2024
1 parent 99b274a commit 002b8af
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion component/ca/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import (
"strconv"
"strings"
"sync"

C "github.com/metacubex/mihomo/constant"
)

var trustCerts []*x509.Certificate
Expand Down Expand Up @@ -117,7 +119,7 @@ func GetTLSConfig(tlsConfig *tls.Config, fingerprint string, customCA string, cu
var certificate []byte
var err error
if len(customCA) > 0 {
certificate, err = os.ReadFile(customCA)
certificate, err = os.ReadFile(C.Path.Resolve(customCA))
if err != nil {
return nil, fmt.Errorf("load ca error: %w", err)
}
Expand Down

0 comments on commit 002b8af

Please sign in to comment.