优化代码

This commit is contained in:
wsczx
2023-04-06 12:29:21 +08:00
parent b3e7212b03
commit bc7c61c337
5 changed files with 211 additions and 238 deletions

View File

@@ -100,8 +100,7 @@ func StartAdmin() {
for _, s := range cipherSuites {
selectedCipherSuites = append(selectedCipherSuites, s.ID)
}
if tlscert, _, err := ParseCert(); err != nil {
if tlscert, _, err := dbdata.ParseCert(); err != nil {
base.Error(err)
return
} else {
@@ -114,10 +113,6 @@ func StartAdmin() {
MinVersion: tls.VersionTLS12,
CipherSuites: selectedCipherSuites,
GetCertificate: func(*tls.ClientHelloInfo) (*tls.Certificate, error) {
// cert, err := tls.LoadX509KeyPair(base.Cfg.CertFile, base.Cfg.CertKey)
// if err != nil {
// return nil, err
// }
return dbdata.TLSCert, nil
},
}