mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 23:00:55 +03:00
ftpd: advertise TLS support only if really enabled
if we don't have a global TLS configuration, advertise TLS only on the bindings where it is configured instead of failing at runtime Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -240,7 +240,10 @@ func (b *Binding) GetTLSDescription() string {
|
||||
return "Implicit"
|
||||
}
|
||||
|
||||
return "Plain and explicit"
|
||||
if certMgr.HasCertificate(common.DefaultTLSKeyPaidID) || certMgr.HasCertificate(b.GetAddress()) {
|
||||
return "Plain and explicit"
|
||||
}
|
||||
return "Disabled"
|
||||
}
|
||||
|
||||
// PortRange defines a port range
|
||||
|
||||
Reference in New Issue
Block a user