Ignore:
Timestamp:
Mar 6, 2010 2:04:52 AM (12 years ago)
Author:
nanang
Message:

Ticket #1043:

  • Fixed bug of unused timeout setting in Symbian SSL socket, ssl_sock_symbian.cpp.
  • Added an SSL test scenario of SSL connect timeout, SSL socket client tries to connect to non-SSL socket server.
  • Fixed OpenSSL-based SSL socket to start SSL timer before TCP connect (was started after TCP connected and before SSL handshake).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/ssl_sock_ossl.c

    r3106 r3117  
    11661166    switch (timer_id) { 
    11671167    case TIMER_HANDSHAKE_TIMEOUT: 
    1168         PJ_LOG(1,(ssock->pool->obj_name, "SSL handshake timeout after %d.%ds", 
     1168        PJ_LOG(1,(ssock->pool->obj_name, "SSL timeout after %d.%ds", 
    11691169                  ssock->param.timeout.sec, ssock->param.timeout.msec)); 
    11701170 
     
    16071607    ssock->write_state.start = ssock->write_state.buf; 
    16081608    ssock->write_state.len = 0; 
    1609  
    1610     /* Start handshake timer */ 
    1611     if (ssock->param.timer_heap && (ssock->param.timeout.sec != 0 || 
    1612         ssock->param.timeout.msec != 0)) 
    1613     { 
    1614         pj_assert(ssock->timer.id == TIMER_NONE); 
    1615         ssock->timer.id = TIMER_HANDSHAKE_TIMEOUT; 
    1616         status = pj_timer_heap_schedule(ssock->param.timer_heap, 
    1617                                         &ssock->timer, 
    1618                                         &ssock->param.timeout); 
    1619         if (status != PJ_SUCCESS) 
    1620             ssock->timer.id = TIMER_NONE; 
    1621     } 
    16221609 
    16231610#ifdef SSL_set_tlsext_host_name 
     
    22912278    pj_sockaddr_cp(&ssock->rem_addr, remaddr); 
    22922279 
     2280    /* Start timer */ 
     2281    if (ssock->param.timer_heap && (ssock->param.timeout.sec != 0 || 
     2282        ssock->param.timeout.msec != 0)) 
     2283    { 
     2284        pj_assert(ssock->timer.id == TIMER_NONE); 
     2285        ssock->timer.id = TIMER_HANDSHAKE_TIMEOUT; 
     2286        status = pj_timer_heap_schedule(ssock->param.timer_heap, 
     2287                                        &ssock->timer, 
     2288                                        &ssock->param.timeout); 
     2289        if (status != PJ_SUCCESS) 
     2290            ssock->timer.id = TIMER_NONE; 
     2291    } 
     2292 
    22932293    status = pj_activesock_start_connect(ssock->asock, pool, remaddr, 
    22942294                                         addr_len); 
Note: See TracChangeset for help on using the changeset viewer.