Ignore:
Timestamp:
Mar 3, 2007 7:35:34 PM (17 years ago)
Author:
bennylp
Message:

Fixed STUN client/server authentication

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib-util/src/pjlib-util/stun_msg.c

    r1037 r1038  
    18421842 
    18431843/* 
     1844static char *print_binary(const pj_uint8_t *data, unsigned data_len) 
     1845{ 
     1846    static char static_buffer[1024]; 
     1847    char *buffer = static_buffer; 
     1848    unsigned length=sizeof(static_buffer), i; 
     1849 
     1850    if (length < data_len * 2 + 8) 
     1851        return ""; 
     1852 
     1853    pj_ansi_sprintf(buffer, ", data="); 
     1854    buffer += 7; 
     1855 
     1856    for (i=0; i<data_len; ++i) { 
     1857        pj_ansi_sprintf(buffer, "%02x", (*data) & 0xFF); 
     1858        buffer += 2; 
     1859        data++; 
     1860    } 
     1861 
     1862    pj_ansi_sprintf(buffer, "\n"); 
     1863    buffer++; 
     1864 
     1865    return static_buffer; 
     1866} 
     1867*/ 
     1868 
     1869/* 
    18441870 * Print the message structure to a buffer. 
    18451871 */ 
     
    20022028 
    20032029        /* Calculate HMAC-SHA1 digest */ 
    2004         pj_hmac_sha1((pj_uint8_t*)buf, buf-start,  
     2030        pj_hmac_sha1((pj_uint8_t*)start, buf-start,  
    20052031                     (pj_uint8_t*)key.ptr, key.slen, 
    20062032                     amsgint->hmac); 
Note: See TracChangeset for help on using the changeset viewer.