Index: lib/base64.c
===================================================================
--- lib/base64.c	(revision 1da00b12d498951219141000947927120b2fdbcc)
+++ lib/base64.c	(revision a8a0b4cc1dafff3d822984a4329488f9aa032694)
@@ -31,8 +31,8 @@
 char *tobase64(const char *text)
 {
-	return base64_encode(text, strlen(text));
+	return base64_encode((const unsigned char *)text, strlen(text));
 }
 
-char *base64_encode(const char *in, int len)
+char *base64_encode(const unsigned char *in, int len)
 {
 	char *out;
Index: lib/base64.h
===================================================================
--- lib/base64.h	(revision 1da00b12d498951219141000947927120b2fdbcc)
+++ lib/base64.h	(revision a8a0b4cc1dafff3d822984a4329488f9aa032694)
@@ -27,5 +27,5 @@
 
 G_MODULE_EXPORT char *tobase64( const char *text );
-G_MODULE_EXPORT char *base64_encode( const char *in, int len );
+G_MODULE_EXPORT char *base64_encode( const unsigned char *in, int len );
 G_MODULE_EXPORT int base64_encode_real( const unsigned char *in, int inlen, unsigned char *out, const char *b64digits );
 G_MODULE_EXPORT char *frombase64( const char *in );
Index: lib/rc4.c
===================================================================
--- lib/rc4.c	(revision 1da00b12d498951219141000947927120b2fdbcc)
+++ lib/rc4.c	(revision a8a0b4cc1dafff3d822984a4329488f9aa032694)
@@ -122,5 +122,5 @@
 */
 
-int rc4_encode( unsigned char *clear, int clear_len, unsigned char **crypt, char *password )
+int rc4_encode( char *clear, int clear_len, unsigned char **crypt, char *password )
 {
 	struct rc4_state *st;
@@ -130,5 +130,5 @@
 	key_len = strlen( password ) + RC4_IV_LEN;
 	if( clear_len <= 0 )
-		clear_len = strlen( (char*) clear );
+		clear_len = strlen( clear );
 	
 	/* Prepare buffers and the key + IV */
@@ -154,5 +154,5 @@
 }
 
-int rc4_decode( unsigned char *crypt, int crypt_len, unsigned char **clear, char *password )
+int rc4_decode( unsigned char *crypt, int crypt_len, char **clear, char *password )
 {
 	struct rc4_state *st;
@@ -165,5 +165,5 @@
 	if( clear_len < 0 )
 	{
-		*clear = (unsigned char*) g_strdup( "" );
+		*clear = g_strdup( "" );
 		return 0;
 	}
Index: lib/rc4.h
===================================================================
--- lib/rc4.h	(revision 1da00b12d498951219141000947927120b2fdbcc)
+++ lib/rc4.h	(revision a8a0b4cc1dafff3d822984a4329488f9aa032694)
@@ -33,4 +33,4 @@
 struct rc4_state *rc4_keymaker( unsigned char *key, int kl, int cycles );
 unsigned char rc4_getbyte( struct rc4_state *st );
-int rc4_encode( unsigned char *clear, int clear_len, unsigned char **crypt, char *password );
-int rc4_decode( unsigned char *crypt, int crypt_len, unsigned char **clear, char *password );
+int rc4_encode( char *clear, int clear_len, unsigned char **crypt, char *password );
+int rc4_decode( unsigned char *crypt, int crypt_len, char **clear, char *password );
Index: lib/ssl_bogus.c
===================================================================
--- lib/ssl_bogus.c	(revision 1da00b12d498951219141000947927120b2fdbcc)
+++ lib/ssl_bogus.c	(revision a8a0b4cc1dafff3d822984a4329488f9aa032694)
@@ -52,4 +52,9 @@
 }
 
+void *ssl_starttls( int fd, ssl_input_function func, gpointer data ) 
+{
+	return NULL;
+}
+
 b_input_condition ssl_getdirection( void *conn )
 {
Index: protocols/jabber/sasl.c
===================================================================
--- protocols/jabber/sasl.c	(revision 1da00b12d498951219141000947927120b2fdbcc)
+++ protocols/jabber/sasl.c	(revision a8a0b4cc1dafff3d822984a4329488f9aa032694)
@@ -89,5 +89,5 @@
 		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 );
@@ -185,5 +185,6 @@
 	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;
@@ -216,5 +217,5 @@
 			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 );
Index: storage_xml.c
===================================================================
--- storage_xml.c	(revision 1da00b12d498951219141000947927120b2fdbcc)
+++ storage_xml.c	(revision a8a0b4cc1dafff3d822984a4329488f9aa032694)
@@ -132,5 +132,6 @@
 	{
 		char *protocol, *handle, *server, *password = NULL, *autoconnect;
-		char *pass_b64 = NULL, *pass_rc4 = NULL;
+		char *pass_b64 = NULL;
+		unsigned char *pass_rc4 = NULL;
 		int pass_len;
 		struct prpl *prpl = NULL;
@@ -152,6 +153,5 @@
 			             "Unknown protocol: %s", protocol );
 		else if( ( pass_len = base64_decode( pass_b64, (unsigned char**) &pass_rc4 ) ) &&
-		                rc4_decode( (unsigned char*) pass_rc4, pass_len,
-		                            (unsigned char**) &password, xd->given_pass ) )
+		                         rc4_decode( pass_rc4, pass_len, &password, xd->given_pass ) )
 		{
 			xd->current_account = account_add( irc, prpl, handle, password );
@@ -410,5 +410,5 @@
 	md5_finish( &md5_state, pass_md5 );
 	/* Save the hash in base64-encoded form. */
-	pass_buf = base64_encode( (char*) pass_md5, 21 );
+	pass_buf = base64_encode( pass_md5, 21 );
 	
 	if( !xml_printf( fd, 0, "<user nick=\"%s\" password=\"%s\" version=\"%d\">\n", irc->nick, pass_buf, XML_FORMAT_VERSION ) )
@@ -424,8 +424,9 @@
 	for( acc = irc->accounts; acc; acc = acc->next )
 	{
-		char *pass_rc4, *pass_b64;
+		unsigned char *pass_rc4;
+		char *pass_b64;
 		int pass_len;
 		
-		pass_len = rc4_encode( (unsigned char*) acc->pass, strlen( acc->pass ), (unsigned char**) &pass_rc4, irc->password );
+		pass_len = rc4_encode( acc->pass, strlen( acc->pass ), (unsigned char**) &pass_rc4, irc->password );
 		pass_b64 = base64_encode( pass_rc4, pass_len );
 		g_free( pass_rc4 );
