Ignore:
Timestamp:
Aug 27, 2009 7:55:13 PM (13 years ago)
Author:
nanang
Message:

Ticket #957: Initial version of TLS transport for Symbian, includes:

  • Secure socket, generic abstraction and Symbian implementation (using CSecureSocket).
  • Initial rewriting of SIP TLS transport.
  • Updated symbian_ua.mmp to support SIP transport TLS (experimental).


File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/symbian_ua/ua.cpp

    r2781 r2913  
    3636// Destination URI (to make call, or to subscribe presence) 
    3737// 
    38 #define SIP_DST_URI     "sip:100@pjsip.lab" 
     38#define SIP_DST_URI     "<sip:100@pjsip.lab>" 
    3939 
    4040// 
     
    5353 
    5454// 
    55 // Set to 1 if TCP is desired (experimental) 
    56 // 
    57 #define ENABLE_SIP_TCP  0 
     55// SIP transports 
     56// 
     57#define ENABLE_SIP_UDP  1 
     58#define ENABLE_SIP_TCP  0 // experimental 
     59#define ENABLE_SIP_TLS  0 // experimental 
    5860 
    5961// 
     
    374376                &codec_id, PJMEDIA_CODEC_PRIO_DISABLED); 
    375377    } 
    376      
    377     /* Add UDP transport. */ 
     378 
     379     
    378380    pjsua_transport_config tcfg; 
    379381    pjsua_transport_id tid; 
    380382 
     383#if ENABLE_SIP_UDP 
     384    /* Add UDP transport. */ 
    381385    pjsua_transport_config_default(&tcfg); 
    382386    tcfg.port = SIP_PORT; 
     
    387391            return status; 
    388392    } 
    389  
     393#endif 
     394     
     395#if ENABLE_SIP_TCP 
    390396    /* Add TCP transport */ 
    391 #if ENABLE_SIP_TCP 
    392397    pjsua_transport_config_default(&tcfg); 
    393398    tcfg.port = SIP_PORT; 
     
    395400    if (status != PJ_SUCCESS) { 
    396401            pjsua_perror(THIS_FILE, "Error creating TCP transport", status); 
     402            pjsua_destroy(); 
     403            return status; 
     404    } 
     405#endif 
     406     
     407#if ENABLE_SIP_TLS 
     408    /* Add TLS transport */ 
     409    pjsua_transport_config_default(&tcfg); 
     410    tcfg.port = SIP_PORT + 1; 
     411    status = pjsua_transport_create(PJSIP_TRANSPORT_TLS, &tcfg, &tid); 
     412    if (status != PJ_SUCCESS) { 
     413            pjsua_perror(THIS_FILE, "Error creating TLS transport", status); 
    397414            pjsua_destroy(); 
    398415            return status; 
Note: See TracChangeset for help on using the changeset viewer.