Changeset 5850


Ignore:
Timestamp:
Aug 1, 2018 8:34:19 AM (16 months ago)
Author:
ming
Message:

Fixed #2136: Increase default ICE password length as mandated by the RFC

Location:
pjproject/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/transport_ice.c

    r5820 r5850  
    701701            pjmedia_sdp_attr_add(&m->attr_count, m->attr, attr); 
    702702 
     703            str.slen = PJ_ICE_PWD_LEN; 
    703704            str.ptr = (char*) pj_pool_alloc(sdp_pool, str.slen); 
    704705            pj_create_random_string(str.ptr, str.slen); 
  • pjproject/trunk/pjnath/include/pjnath/config.h

    r5481 r5850  
    431431/** 
    432432 * This constant specifies the length of random string generated for ICE 
    433  * ufrag and password. 
     433 * ufrag. 
    434434 * 
    435435 * Default: 8 (characters) 
     
    437437#ifndef PJ_ICE_UFRAG_LEN 
    438438#   define PJ_ICE_UFRAG_LEN                         8 
     439#endif 
     440 
     441 
     442/** 
     443 * This constant specifies the length of random string generated for ICE 
     444 * password. 
     445 * 
     446 * Default: 24 (characters) 
     447 */ 
     448#ifndef PJ_ICE_PWD_LEN 
     449#   define PJ_ICE_PWD_LEN                           24 
    439450#endif 
    440451 
  • pjproject/trunk/pjnath/src/pjnath/ice_session.c

    r5833 r5850  
    410410 
    411411    if (local_passwd == NULL) { 
    412         ice->rx_pass.ptr = (char*) pj_pool_alloc(ice->pool, PJ_ICE_UFRAG_LEN); 
    413         pj_create_random_string(ice->rx_pass.ptr, PJ_ICE_UFRAG_LEN); 
    414         ice->rx_pass.slen = PJ_ICE_UFRAG_LEN; 
     412        ice->rx_pass.ptr = (char*) pj_pool_alloc(ice->pool, PJ_ICE_PWD_LEN); 
     413        pj_create_random_string(ice->rx_pass.ptr, PJ_ICE_PWD_LEN); 
     414        ice->rx_pass.slen = PJ_ICE_PWD_LEN; 
    415415    } else { 
    416416        pj_strdup(ice->pool, &ice->rx_pass, local_passwd); 
Note: See TracChangeset for help on using the changeset viewer.