mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2026-02-19 15:15:40 +08:00
CA证书也支持IP地址
This commit is contained in:
@@ -99,6 +99,16 @@ func (this *SSLCertConfig) Init(ctx context.Context) error {
|
||||
}
|
||||
}
|
||||
|
||||
for _, ipAddress := range c.IPAddresses {
|
||||
if ipAddress == nil {
|
||||
continue
|
||||
}
|
||||
var ipAddressString = ipAddress.String()
|
||||
if !lists.ContainsString(dnsNames, ipAddressString) {
|
||||
dnsNames = append(dnsNames, ipAddressString)
|
||||
}
|
||||
}
|
||||
|
||||
commonNames = append(commonNames, c.Issuer.CommonName)
|
||||
|
||||
if index == 0 {
|
||||
|
||||
Reference in New Issue
Block a user