]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
use time_delta instead of uint32
authorAlan T. DeKok <aland@freeradius.org>
Wed, 22 Sep 2021 16:16:40 +0000 (12:16 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 22 Sep 2021 16:16:40 +0000 (12:16 -0400)
src/lib/tls/cache.c
src/lib/tls/conf.c

index d47cfa2475d2108648732f63b989b29ebde0693e..23e1d26cb110fa95969566e360946fd1c0dec722 100644 (file)
@@ -1179,7 +1179,7 @@ int fr_tls_cache_ctx_init(SSL_CTX *ctx, fr_tls_cache_conf_t const *cache_conf)
                /*
                 *      Controls the validity period of the stateful cache.
                 */
-               SSL_CTX_set_timeout(ctx, cache_conf->lifetime);
+               SSL_CTX_set_timeout(ctx, fr_time_delta_to_sec(cache_conf->lifetime));
 
                /*
                 *      Disables stateless session tickets for TLS 1.3.
index b1b7940044199a5c022a6eaf06ef1e8e5ba9e1de..b168f8f06236577090fc8bf19e22a521d02c513a 100644 (file)
@@ -87,7 +87,7 @@ static CONF_PARSER tls_cache_config[] = {
                         .dflt = "auto" },
        { FR_CONF_OFFSET("name", FR_TYPE_TMPL, fr_tls_cache_conf_t, id_name),
                         .dflt = "%{EAP-Type}%{Virtual-Server}", .quote = T_DOUBLE_QUOTED_STRING },
-       { FR_CONF_OFFSET("lifetime", FR_TYPE_UINT32, fr_tls_cache_conf_t, lifetime), .dflt = "86400" },
+       { FR_CONF_OFFSET("lifetime", FR_TYPE_TIME_DELTA, fr_tls_cache_conf_t, lifetime), .dflt = "1d" },
 
 #if OPENSSL_VERSION_NUMBER >= 0x10100000L
        { FR_CONF_OFFSET("require_extended_master_secret", FR_TYPE_BOOL, fr_tls_cache_conf_t, require_extms), .dflt = "yes" },