aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/jabber/sasl.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2006-09-22 20:39:31 +0200
committerWilmer van der Gaast <wilmer@gaast.net>2006-09-22 20:39:31 +0200
commitfe7a55434385fd858453dffdbb425a21f41e3859 (patch)
tree31f7d29dd436d59d80d06674c12b98b934ddb467 /protocols/jabber/sasl.c
parent8d7429102adf8dce6844f2f3da2723d1f87c6442 (diff)
Better detection of successful IQ authentication (using packet caching),
properly working SASL authentication (although only PLAIN so far).
Diffstat (limited to 'protocols/jabber/sasl.c')
-rw-r--r--protocols/jabber/sasl.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/protocols/jabber/sasl.c b/protocols/jabber/sasl.c
index 2f75e733..13ff9d26 100644
--- a/protocols/jabber/sasl.c
+++ b/protocols/jabber/sasl.c
@@ -70,7 +70,13 @@ xt_status sasl_pkt_mechanisms( struct xt_node *node, gpointer data )
reply = xt_new_node( "auth", NULL, NULL );
xt_add_attr( reply, "xmlns", SASL_NS );
- if( sup_plain )
+ if( sup_digest && 0 )
+ {
+ xt_add_attr( reply, "mechanism", "DIGEST-MD5" );
+
+ /* The rest will be done later, when we receive a <challenge/>. */
+ }
+ else if( sup_plain )
{
int len;
@@ -140,5 +146,5 @@ gboolean sasl_supported( struct gaim_connection *gc )
{
struct jabber_data *jd = gc->proto_data;
- return ( jd->xt && jd->xt->root && xt_find_attr( jd->xt->root, "version" ) ) != NULL;
+ return ( (void*) ( jd->xt && jd->xt->root && xt_find_attr( jd->xt->root, "version" ) ) ) != NULL;
}