sslconf

package
v1.10.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateX509KeyPairByBase64Str

func CreateX509KeyPairByBase64Str(certBase64, keyBase64 string) (*tls.Certificate, error)

func GetCertDomainInfo

func GetCertDomainInfo(cert *tls.Certificate) (*[]CertInfo, error)

func GetDomainsTrimSpace

func GetDomainsTrimSpace(dst []string) []string

除去空域名

Types

type CertInfo

type CertInfo struct {
	Domains       []string
	NotBeforeTime string `json:"NotBeforeTime"` //time.Time
	NotAfterTime  string `json:"NotAfterTime"`  //time.Time
}

type SSLCertficate

type SSLCertficate struct {
	Key        string      `json:"Key"`
	Enable     bool        `json:"Enable"`
	Remark     string      `json:"Remark"` //备注
	CertBase64 string      `json:"CertBase64"`
	KeyBase64  string      `json:"KeyBase64"`
	AddTime    string      `json:"AddTime"` //添加时间
	CertsInfo  *[]CertInfo `json:"-"`
	//---------------------
	Certificate *tls.Certificate `json:"-"`
}

func (*SSLCertficate) GetFirstDomain

func (s *SSLCertficate) GetFirstDomain() string

GetOnlyDomain 返回证书第一条域名

func (*SSLCertficate) Init

func (s *SSLCertficate) Init() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL