Changeset 4485285 for libfaim/auth.c


Ignore:
Timestamp:
Jan 12, 2013, 1:43:31 PM (12 years ago)
Author:
Jason Gross <jasongross9@gmail.com>
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.
Message:
Merge 7869e4801e577613b7db987d11bddb0a31fe755c into 46260161946c87dfed4fef9e3223b2327895f139
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfaim/auth.c

    rcf02dd6 r7869e48  
    22 * Family 0x0017 - Authentication.
    33 *
    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
    55 * non-SNAC login.
    66 *
     
    2424 *
    2525 * 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!
    2727 *
    2828 * This is only used for the XOR method, not the better MD5 method.
     
    5959        md5_state_t state;
    6060
    61         md5_init(&state);       
     61        md5_init(&state);
    6262        md5_append(&state, (const md5_byte_t *)key, strlen(key));
    6363        md5_append(&state, (const md5_byte_t *)password, strlen(password));
     
    7777        md5_finish(&state, (md5_byte_t *)&passdigest);
    7878
    79         md5_init(&state);       
     79        md5_init(&state);
    8080        md5_append(&state, (const md5_byte_t *)key, strlen(key));
    8181        md5_append(&state, (const md5_byte_t *)&passdigest, 16);
     
    8888
    8989/*
    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
    9292 * for other services (BOS, chatnav, chat, etc.).
    9393 */
     
    197197 *   build  = 0x0013
    198198 *   unknown= (not sent)
    199  *   
     199 *
    200200 * AIM for Linux 1.1.112:
    201201 *   clientstring = "AOL Instant Messenger (SM)"
     
    260260
    261261        aim_tlvlist_free(&tl);
    262        
     262
    263263        aim_tx_enqueue(sess, fr);
    264264
     
    269269 * This is sent back as a general response to the login command.
    270270 * It can be either an error or a success, depending on the
    271  * precense of certain TLVs. 
     271 * precense of certain TLVs.
    272272 *
    273273 * The client should check the value passed as errorcode. If
     
    303303         * have an error url.
    304304         */
    305         if (aim_tlv_gettlv(tlvlist, 0x0008, 1)) 
     305        if (aim_tlv_gettlv(tlvlist, 0x0008, 1))
    306306                info->errorcode = aim_tlv_get16(tlvlist, 0x0008, 1);
    307307        if (aim_tlv_gettlv(tlvlist, 0x0004, 1))
     
    329329         * The email address attached to this account
    330330         *   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
    332332         *   family 0x0018 to check the status of your email.
    333333         * XXX - Not really true!
     
    436436        aim_frame_t fr;
    437437        aim_rxcallback_t userfunc;
    438        
     438
    439439        fr.conn = conn;
    440        
     440
    441441        if ((userfunc = aim_callhandler(sess, conn, 0x0017, 0x0007)))
    442442                userfunc(sess, &fr, "");
     
    448448 * Subtype 0x0006
    449449 *
    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).
    455455 *
    456456 */
     
    460460        aim_snacid_t snacid;
    461461        aim_tlvlist_t *tl = NULL;
    462        
     462
    463463        if (!sess || !conn || !sn)
    464464                return -EINVAL;
     
    504504        keystr = aimbs_getstr(bs, keylen);
    505505
    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.
    508508         * Data is 0x0007 0004 3e19 ae1e 0006 0004 0000 0005 */
    509509
     
    511511                ret = userfunc(sess, rx, keystr);
    512512
    513         free(keystr); 
     513        free(keystr);
    514514
    515515        return ret;
Note: See TracChangeset for help on using the changeset viewer.