Add mechanism to set OpenSSL session timeout

In a sofia profile, you can now set the parameter tls-timeout to a
positive integer value which represents the maximum time in seconds
that OpenSSL will keep a TLS session (and its ephemeral keys) alive.

This value is passed to OpenSSL's SSL_CTX_set_timeout(3).

OpenSSL's default value is 300 seconds, but the relevant standard
(RFC 2246) suggests that much longer session lifetimes are
acceptable (it recommends values less than 24 hours).

Longer values can be useful for extending battery life on mobile
devices.

Signed-off-by: Travis Cross <tc@traviscross.com>
This commit is contained in:
Travis Cross
2012-06-08 22:06:55 +00:00
parent 45fdf0db19
commit c85c8d7bbd
9 changed files with 35 additions and 1 deletions
+1
View File
@@ -596,6 +596,7 @@ struct sofia_profile {
switch_port_t sip_port;
switch_port_t tls_sip_port;
int tls_version;
unsigned int tls_timeout;
char *inbound_codec_string;
char *outbound_codec_string;
int running;