Try setting an alert if the socket is not timing out
to your liking.
Better yet, switch to using non blocking asynch
sockets and manage socket timeouts sepperately, on
your own schedule.

Hope this helps,

Tim
--- Guillaume Peersman <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I am trying to find a way to make SSL_connect time
> out. Basically i have 
> a problem when connecting to a site that is not
> responding (too busy or 
> any other reason). The software at my end stops
> waiting for data during 
> the SSL negociation.
> 
> I include am extract of the code below. The process
> hangs in the 
> SSL_connect call.
> 
> Any helps would be appreciated
> 
> thanks
> 
>   RAND_seed(rnd_seed, sizeof rnd_seed);
>  
>   if ( (pConn->c_ssl=SSL_new(pConn->c_ctx)) ==
> NULL){
>     report(0,"FATAL: SSL error SSL_new: 
> %s\n",ERR_error_string(ERR_get_error(),NULL));
>     return FAIL;
>   }
>   SSL_set_connect_state(pConn->c_ssl); 
>   SSL_set_fd(pConn->c_ssl,pConn->fd); 
>   SSL_set_verify_depth(pConn->c_ssl, 9 );
>   if ( SSL_connect(pConn->c_ssl) == -1 ) {
>     report(0,"FATAL: SSL error SSL_connect: 
> %s\n",ERR_error_string(ERR_get_error(),NULL));
>     return FAIL;
>   }
> 
> -- 
> Technical Manager
> Dialogue Communications Limited
> 
> Tel:    +44-114-221-0303
> Fax:    +44-114-249-1181
> email:  [EMAIL PROTECTED]
> Web :   http://www.dialogue.co.uk
>       http://www.envelos.com
> 
> The Workstation, 15 Paternoster Row, Sheffield, S1
> 2BX, United Kingdom.
> 
> Dialogue Communications (Estd. 1994) is a world
> leader in the development 
> and implementation of mobile data and internet
> messaging solutions.
> The company's technology bridges the gap between the
> fixed and mobile worlds
> - delivering carrier class platforms to both service
> providers and 
> enterprise customers around the globe.
> 
> 
>
______________________________________________________________________
> OpenSSL Project                                
> http://www.openssl.org
> User Support Mailing List                   
> [EMAIL PROTECTED]
> Automated List Manager                          
[EMAIL PROTECTED]


__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to