Changeset 3b6eadc for storage_xml.c
- Timestamp:
- 2007-07-07T17:19:28Z (17 years ago)
- Branches:
- master
- Children:
- b9e4ab5
- Parents:
- f7b44f2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
storage_xml.c
rf7b44f2 r3b6eadc 132 132 { 133 133 char *protocol, *handle, *server, *password = NULL, *autoconnect; 134 char *pass_b64 = NULL, *pass_rc4 = NULL; 134 char *pass_b64 = NULL; 135 unsigned char *pass_rc4 = NULL; 135 136 int pass_len; 136 137 struct prpl *prpl = NULL; … … 152 153 "Unknown protocol: %s", protocol ); 153 154 else if( ( pass_len = base64_decode( pass_b64, (unsigned char**) &pass_rc4 ) ) && 154 rc4_decode( (unsigned char*) pass_rc4, pass_len, 155 (unsigned char**) &password, xd->given_pass ) ) 155 rc4_decode( pass_rc4, pass_len, 156 &password, 157 xd->given_pass ) ) 156 158 { 157 159 xd->current_account = account_add( irc, prpl, handle, password ); … … 410 412 md5_finish( &md5_state, pass_md5 ); 411 413 /* Save the hash in base64-encoded form. */ 412 pass_buf = base64_encode( (char*)pass_md5, 21 );414 pass_buf = base64_encode( pass_md5, 21 ); 413 415 414 416 if( !xml_printf( fd, 0, "<user nick=\"%s\" password=\"%s\" version=\"%d\">\n", irc->nick, pass_buf, XML_FORMAT_VERSION ) ) … … 424 426 for( acc = irc->accounts; acc; acc = acc->next ) 425 427 { 426 char *pass_rc4, *pass_b64; 428 unsigned char *pass_rc4; 429 char *pass_b64; 427 430 int pass_len; 428 431 429 pass_len = rc4_encode( (unsigned char*)acc->pass, strlen( acc->pass ), (unsigned char**) &pass_rc4, irc->password );432 pass_len = rc4_encode( acc->pass, strlen( acc->pass ), (unsigned char**) &pass_rc4, irc->password ); 430 433 pass_b64 = base64_encode( pass_rc4, pass_len ); 431 434 g_free( pass_rc4 );
Note: See TracChangeset
for help on using the changeset viewer.