Clean up and fix StartTLS feature discovery

Required field was never set to true
This commit is contained in:
Mickael Remond
2019-06-10 16:27:52 +02:00
parent 44568fcf2b
commit 709a95129e
7 changed files with 149 additions and 27 deletions

View File

@@ -109,7 +109,7 @@ func (s *Session) startTlsIfSupported(conn net.Conn, domain string) net.Conn {
return conn
}
if s.Features.StartTLS.XMLName.Space+" "+s.Features.StartTLS.XMLName.Local == nsTLS+" starttls" {
if _, ok := s.Features.DoesStartTLS(); ok {
fmt.Fprintf(s.socketProxy, "<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>")
var k tlsProceed