mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2026-04-17 16:45:17 +08:00
修复客户端CA证书设置不起作用的Bug
This commit is contained in:
@@ -71,6 +71,8 @@ func (this *SSLPolicy) Init() error {
|
||||
}
|
||||
|
||||
// CA certs
|
||||
this.clientCAPool = x509.NewCertPool()
|
||||
|
||||
for _, cert := range this.ClientCACerts {
|
||||
err := cert.Init()
|
||||
if err != nil {
|
||||
@@ -80,6 +82,10 @@ func (this *SSLPolicy) Init() error {
|
||||
for _, dnsName := range cert.DNSNames {
|
||||
this.nameMapping[dnsName] = cert.CertObject()
|
||||
}
|
||||
|
||||
for _, caCert := range cert.CACerts() {
|
||||
this.clientCAPool.AddCert(caCert)
|
||||
}
|
||||
}
|
||||
|
||||
// min version
|
||||
|
||||
Reference in New Issue
Block a user