Changeset 4485285 for libfaim/auth.c
- Timestamp:
- Jan 12, 2013, 1:43:31 PM (12 years ago)
- Parents:
- 4626016 (diff), 7869e48 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libfaim/auth.c
rcf02dd6 r7869e48 2 2 * Family 0x0017 - Authentication. 3 3 * 4 * Deals with the authorizer for SNAC-based login, and also old-style 4 * Deals with the authorizer for SNAC-based login, and also old-style 5 5 * non-SNAC login. 6 6 * … … 24 24 * 25 25 * The encoding_table seems to be a fixed set of values. We'll 26 * hope it doesn't change over time! 26 * hope it doesn't change over time! 27 27 * 28 28 * This is only used for the XOR method, not the better MD5 method. … … 59 59 md5_state_t state; 60 60 61 md5_init(&state); 61 md5_init(&state); 62 62 md5_append(&state, (const md5_byte_t *)key, strlen(key)); 63 63 md5_append(&state, (const md5_byte_t *)password, strlen(password)); … … 77 77 md5_finish(&state, (md5_byte_t *)&passdigest); 78 78 79 md5_init(&state); 79 md5_init(&state); 80 80 md5_append(&state, (const md5_byte_t *)key, strlen(key)); 81 81 md5_append(&state, (const md5_byte_t *)&passdigest, 16); … … 88 88 89 89 /* 90 * The FLAP version is sent by itself at the beginning of authorization 91 * connections. The FLAP version is also sent before the cookie when connecting 90 * The FLAP version is sent by itself at the beginning of authorization 91 * connections. The FLAP version is also sent before the cookie when connecting 92 92 * for other services (BOS, chatnav, chat, etc.). 93 93 */ … … 197 197 * build = 0x0013 198 198 * unknown= (not sent) 199 * 199 * 200 200 * AIM for Linux 1.1.112: 201 201 * clientstring = "AOL Instant Messenger (SM)" … … 260 260 261 261 aim_tlvlist_free(&tl); 262 262 263 263 aim_tx_enqueue(sess, fr); 264 264 … … 269 269 * This is sent back as a general response to the login command. 270 270 * It can be either an error or a success, depending on the 271 * precense of certain TLVs. 271 * precense of certain TLVs. 272 272 * 273 273 * The client should check the value passed as errorcode. If … … 303 303 * have an error url. 304 304 */ 305 if (aim_tlv_gettlv(tlvlist, 0x0008, 1)) 305 if (aim_tlv_gettlv(tlvlist, 0x0008, 1)) 306 306 info->errorcode = aim_tlv_get16(tlvlist, 0x0008, 1); 307 307 if (aim_tlv_gettlv(tlvlist, 0x0004, 1)) … … 329 329 * The email address attached to this account 330 330 * Not available for ICQ or @mac.com logins. 331 * If you receive this TLV, then you are allowed to use 331 * If you receive this TLV, then you are allowed to use 332 332 * family 0x0018 to check the status of your email. 333 333 * XXX - Not really true! … … 436 436 aim_frame_t fr; 437 437 aim_rxcallback_t userfunc; 438 438 439 439 fr.conn = conn; 440 440 441 441 if ((userfunc = aim_callhandler(sess, conn, 0x0017, 0x0007))) 442 442 userfunc(sess, &fr, ""); … … 448 448 * Subtype 0x0006 449 449 * 450 * In AIM 3.5 protocol, the first stage of login is to request login from the 451 * Authorizer, passing it the screen name for verification. If the name is 452 * invalid, a 0017/0003 is spit back, with the standard error contents. If 453 * valid, a 0017/0007 comes back, which is the signal to send it the main 454 * login command (0017/0002). 450 * In AIM 3.5 protocol, the first stage of login is to request login from the 451 * Authorizer, passing it the screen name for verification. If the name is 452 * invalid, a 0017/0003 is spit back, with the standard error contents. If 453 * valid, a 0017/0007 comes back, which is the signal to send it the main 454 * login command (0017/0002). 455 455 * 456 456 */ … … 460 460 aim_snacid_t snacid; 461 461 aim_tlvlist_t *tl = NULL; 462 462 463 463 if (!sess || !conn || !sn) 464 464 return -EINVAL; … … 504 504 keystr = aimbs_getstr(bs, keylen); 505 505 506 /* XXX - When GiantGrayPanda signed on AIM I got a thing asking me to register 507 * for the netscape network. This SNAC had a type 0x0058 TLV with length 10. 506 /* XXX - When GiantGrayPanda signed on AIM I got a thing asking me to register 507 * for the netscape network. This SNAC had a type 0x0058 TLV with length 10. 508 508 * Data is 0x0007 0004 3e19 ae1e 0006 0004 0000 0005 */ 509 509 … … 511 511 ret = userfunc(sess, rx, keystr); 512 512 513 free(keystr); 513 free(keystr); 514 514 515 515 return ret;
Note: See TracChangeset
for help on using the changeset viewer.