mirror of
https://github.com/MetaCubeX/Clash.Meta.git
synced 2025-04-20 01:00:56 +00:00
chore: Random only if the certificate and private-key are empty
This commit is contained in:
parent
9e6aaea7e0
commit
5f25633a0c
1 changed files with 1 additions and 1 deletions
|
@ -11,7 +11,7 @@ import (
|
|||
)
|
||||
|
||||
func ParseCert(certificate, privateKey string) (tls.Certificate, error) {
|
||||
if certificate == "" || privateKey == "" {
|
||||
if certificate == "" && privateKey == "" {
|
||||
return newRandomTLSKeyPair()
|
||||
}
|
||||
cert, painTextErr := tls.X509KeyPair([]byte(certificate), []byte(privateKey))
|
||||
|
|
Loading…
Add table
Reference in a new issue