C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 7th, 2013, 06:34 AM
Duraisam Duraisam is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 2 Duraisam User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 m 28 sec
Reputation Power: 0
Open SSL Communication TimeOut(SSL_CTX_set_timeout) Problem

Dear All,
I am using Open SSL for Client Server Communication.It is working fine but session time out is not working.

Below is the code
-----------------------
SSL_CTX *ctx;
OpenSSL_add_all_algorithms();
if(SSL_library_init() != 1)
return -1; //SSl Library init fail
SSL_load_error_strings(); /* Load the error strings for SSL & CRYPTO APIs */
meth = SSLv3_method(); /* Create an SSL_METHOD structure*/
ctx = SSL_CTX_new(meth);
SSL_CTX_set_timeout(ctx,180);//set timeout


But SSL_CTX_set_timeout(ctx,180) is not working even though the
client does not receive any message from server for more than 5 min.

Kindly advice me to solve the issue.

Regards
SAM

Reply With Quote
  #2  
Old February 7th, 2013, 06:39 AM
Duraisam Duraisam is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 2 Duraisam User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 m 28 sec
Reputation Power: 0
SSL Communication time out problem
SSL_CTX_set_timeout(ctx,180)//not working

Reply With Quote
  #3  
Old February 8th, 2013, 12:16 AM
BobS0327 BobS0327 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2012
Posts: 118 BobS0327 User rank is Sergeant Major (2000 - 5000 Reputation Level)BobS0327 User rank is Sergeant Major (2000 - 5000 Reputation Level)BobS0327 User rank is Sergeant Major (2000 - 5000 Reputation Level)BobS0327 User rank is Sergeant Major (2000 - 5000 Reputation Level)BobS0327 User rank is Sergeant Major (2000 - 5000 Reputation Level)BobS0327 User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 3 Days 18 h 48 m 29 sec
Reputation Power: 44
Setting the timeout on an SSL session causes the session to expire after the timeout, but that just means that the client has to create a new SSL session with a full handshake next time he connects (because a new connection cannot join an expired session). It doesn't mean that the existing connection gets invalidated.

SSL setup and data exchange over a TCP connection takes place in two phases: handshake and data transfer. The handshake phase involves negotiation of the cipher-suite, authentication of end-points and agreement on cryptographic keys for subsequent encryption and decryption of application data. This establishes a SSL Session between two end-points. The data transfer phase involves message digest computation, encryption and transmission of the encrypted data blocks at one end and reception, decryption and digest verification at the other end.

If a client has a invalid session because the session timed out, it has to go thru the handshaking process again. But the underlying TCP connection is still valid

The timeout is probably working since you didn't post the complete code but it appears that it is not working in the way I believe you expect it to work.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > Open SSL Communication TimeOut(SSL_CTX_set_timeout) Problem

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap