mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-12-08 10:30:24 +08:00
增加证书OCSP错误日志管理
This commit is contained in:
@@ -1 +1,31 @@
|
||||
package models
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
func (this *SSLCert) DecodeDNSNames() []string {
|
||||
if len(this.DnsNames) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
var result = []string{}
|
||||
var err = json.Unmarshal([]byte(this.DnsNames), &result)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
func (this *SSLCert) DecodeCommonNames() []string {
|
||||
if len(this.CommonNames) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
var result = []string{}
|
||||
var err = json.Unmarshal([]byte(this.CommonNames), &result)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user