diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2007-10-12 01:08:58 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2007-10-12 01:08:58 +0100 |
commit | eda54e40d04c83028d84e91c895a550c1929b436 (patch) | |
tree | 878f985af2ab5d2b9c59e8c955448bc4e9ddec17 /protocols/jabber/sasl.c | |
parent | 82135c7178b6379f35741991f6c06bb308143194 (diff) | |
parent | d444c09e6c7ac6fc3c1686af0e63c09805d8cd00 (diff) |
Merge from devel.
Diffstat (limited to 'protocols/jabber/sasl.c')
-rw-r--r-- | protocols/jabber/sasl.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/protocols/jabber/sasl.c b/protocols/jabber/sasl.c index 69199a8b..6eee37b3 100644 --- a/protocols/jabber/sasl.c +++ b/protocols/jabber/sasl.c @@ -88,7 +88,7 @@ xt_status sasl_pkt_mechanisms( struct xt_node *node, gpointer data ) s[0] = 0; strcpy( s + 1, jd->username ); strcpy( s + 2 + strlen( jd->username ), ic->acc->pass ); - reply->text = base64_encode( s, len ); + reply->text = base64_encode( (unsigned char *)s, len ); reply->text_len = strlen( reply->text ); g_free( s ); } @@ -184,7 +184,8 @@ xt_status sasl_pkt_challenge( struct xt_node *node, gpointer data ) struct im_connection *ic = data; struct jabber_data *jd = ic->proto_data; struct xt_node *reply = NULL; - char *nonce = NULL, *realm = NULL, *cnonce = NULL, cnonce_bin[30]; + char *nonce = NULL, *realm = NULL, *cnonce = NULL; + unsigned char cnonce_bin[30]; char *digest_uri = NULL; char *dec = NULL; char *s = NULL; @@ -215,7 +216,7 @@ xt_status sasl_pkt_challenge( struct xt_node *node, gpointer data ) if( !realm ) realm = g_strdup( jd->server ); - random_bytes( (unsigned char *) cnonce_bin, sizeof( cnonce_bin ) ); + random_bytes( cnonce_bin, sizeof( cnonce_bin ) ); cnonce = base64_encode( cnonce_bin, sizeof( cnonce_bin ) ); digest_uri = g_strdup_printf( "%s/%s", "xmpp", jd->server ); |