mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-12-08 16:10:26 +08:00
实现证书管理
This commit is contained in:
@@ -2,23 +2,27 @@ package serverconfigs
|
||||
|
||||
import "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/sslconfigs"
|
||||
|
||||
// TLS Version
|
||||
type TLSVersion = string
|
||||
|
||||
// Cipher Suites
|
||||
type TLSCipherSuite = string
|
||||
|
||||
// HTTPS协议配置
|
||||
type HTTPSProtocolConfig struct {
|
||||
BaseProtocol `yaml:",inline"`
|
||||
|
||||
SSL *sslconfigs.SSLConfig `yaml:"ssl"`
|
||||
SSLPolicyRef *sslconfigs.SSLRef `yaml:"sslPolicyRef" json:"sslPolicyRef"`
|
||||
SSLPolicy *sslconfigs.SSLPolicy `yaml:"sslPolicy" json:"sslPolicy"`
|
||||
}
|
||||
|
||||
// 初始化
|
||||
func (this *HTTPSProtocolConfig) Init() error {
|
||||
err := this.InitBase()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if this.SSLPolicy != nil {
|
||||
err := this.SSLPolicy.Init()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user