fippo redo: don't offer an empty list of mechanisms

This commit is contained in:
psyc://psyced.org/~lynX 2010-11-18 13:08:16 +01:00
parent 1a38cfdc6f
commit a3c6758bba

View File

@ -530,7 +530,6 @@ open_stream(XMLNode node) {
packet += "<starttls xmlns='" NS_XMPP "xmpp-tls'/>";
} else unless (mappingp(authhosts)) {
# ifdef WANT_S2S_SASL
packet += "<mechanisms xmlns='" NS_XMPP "xmpp-sasl'>";
// if the other side did present a client certificate
// and we have verified it as X509_V_OK (0)
// we offer SASL external (authentication via name
@ -545,11 +544,12 @@ open_stream(XMLNode node) {
if (node["@from"] &&
certificate_check_jabbername(node["@from"],
certinfo)) {
packet += "<mechanisms xmlns='" NS_XMPP "xmpp-sasl'>";
packet += "<mechanism>EXTERNAL</mechanism>";
packet += "</mechanisms>";
}
}
# endif
packet += "</mechanisms>";
# endif
}
}