增加证书OCSP错误日志管理

This commit is contained in:
刘祥超
2022-03-11 20:27:53 +08:00
parent da67e726a2
commit 2f7b7240dd
3 changed files with 210 additions and 0 deletions

View File

@@ -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
}