fix(tls): regenerate full cert pair when only key or cert is present
Half-filled TLS material blocked autofill and left TUIC/AnyTLS without a usable certificate. Clear the partial pair and issue a new self-signed certificate+key together. fix(tls): regenerate full cert pair when only key or cert is present Half-filled TLS material blocked autofill and left TUIC/AnyTLS without a usable certificate. Clear the partial pair and issue a new self-signed certificate+key together. fix(tls): regenerate full cert pair when only key or cert is present Half-filled TLS material blocked autofill and left TUIC/AnyTLS without a usable certificate. Clear the partial pair and issue a new self-signed certificate+key together. fix(tls): regenerate full cert pair when only key or cert is present Half-filled TLS material blocked autofill and left TUIC/AnyTLS without a usable certificate. Clear the partial pair and issue a new self-signed certificate+key together. fix(tls): regenerate full cert pair when only key or cert is present Half-filled TLS material blocked autofill and left TUIC/AnyTLS without a usable certificate. Clear the partial pair and issue a new self-signed certificate+key together. fix(tls): regenerate full cert pair when only key or cert is present Half-filled TLS material blocked autofill and left TUIC/AnyTLS without a usable certificate. Clear the partial pair and issue a new self-signed certificate+key together. fix(tls): regenerate full cert pair when only key or cert is present Half-filled TLS material blocked autofill and left TUIC/AnyTLS without a usable certificate. Clear the partial pair and issue a new self-signed certificate+key together. fix(tls): regenerate full cert pair when only key or cert is present Half-filled TLS material blocked autofill and left TUIC/AnyTLS without a usable certificate. Clear the partial pair and issue a new self-signed certificate+key together. fix(tls): regenerate full cert pair when only key or cert is present Half-filled TLS material blocked autofill and left TUIC/AnyTLS without a usable certificate. Clear the partial pair and issue a new self-signed certificate+key together. fix(tls): regenerate full cert pair when only key or cert is present Half-filled TLS material blocked autofill and left TUIC/AnyTLS without a usable certificate. Clear the partial pair and issue a new self-signed certificate+key together. fix(tls): regenerate full cert pair when only key or cert is present Half-filled TLS material blocked autofill and left TUIC/AnyTLS without a usable certificate. Clear the partial pair and issue a new self-signed certificate+key together. fix(tls): regenerate full cert pair when only key or cert is present Half-filled TLS material blocked autofill and left TUIC/AnyTLS without a usable certificate. Clear the partial pair and issue a new self-signed certificate+key together.
This commit is contained in:
1 parent
e589f9d414
commit
4e532fa93b
1 file changed
+4
-2
@@ -47,9 +47,11 @@ func ensureListenerTLSMaterial(protocol string, cfg map[string]interface{}) erro
|
||||
delete(cfg, "allow-insecure")
|
||||
return nil
|
||||
}
|
||||
// Partial cert/key — leave for validator; do not invent half a pair.
|
||||
// Partial pair (only cert or only key) cannot work — drop and regenerate.
|
||||
if strings.TrimSpace(cert) != "" || strings.TrimSpace(key) != "" {
|
||||
return nil
|
||||
delete(cfg, "certificate")
|
||||
delete(cfg, "private-key")
|
||||
delete(cfg, "private_key")
|
||||
}
|
||||
if !listenerProtocolNeedsCert(proto, cfg) {
|
||||
return nil
|
||||
|
||||
Reference in new issue
Block a user