Changeset f52f1b4 in mod_gnutls


Ignore:
Timestamp:
Apr 29, 2018, 3:19:05 PM (3 years ago)
Author:
Fiona Klute <fiona.klute@…>
Branches:
asyncio, debian/master, master, proxy-ticket
Children:
56c722f
Parents:
d8d6b1e
git-author:
Fiona Klute <fiona.klute@…> (04/29/18 14:56:51)
git-committer:
Fiona Klute <fiona.klute@…> (04/29/18 15:19:05)
Message:

Allow GnuTLSCacheTimeout in virtual host config

I'm not sure if anyone needs this, but it simplifies timeout
configuration handling and is certainly not a bad thing.

Files:
1 added
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • doc/mod_gnutls_manual.mdwn

    rd8d6b1e rf52f1b4  
    118118
    119119Default: `GnuTLSCacheTimeout 300`\
    120 Context: server config
     120Context: server config, virtual host
    121121
    122122Sets the timeout for TLS Session Cache entries expiration. This value
  • src/gnutls_config.c

    rd8d6b1e rf52f1b4  
    640640
    641641    if (!apr_strnatcasecmp(parms->directive->directive, "GnuTLSCacheTimeout"))
    642     {
    643         const char *err;
    644         if ((err = ap_check_cmd_context(parms, GLOBAL_ONLY)))
    645             return err;
    646642        sc->cache_timeout = apr_time_from_sec(argint);
    647     }
    648643    else if (!apr_strnatcasecmp(parms->directive->directive,
    649644                                "GnuTLSOCSPCacheTimeout"))
     
    946941    gnutls_srvconf_merge(dh_file, NULL);
    947942    gnutls_srvconf_merge(priorities_str, NULL);
     943    gnutls_srvconf_merge(cache_timeout, MGS_TIMEOUT_UNSET);
    948944
    949945    gnutls_srvconf_merge(proxy_x509_key_file, NULL);
  • src/gnutls_hooks.c

    rd8d6b1e rf52f1b4  
    2121#include "mod_gnutls.h"
    2222#include "gnutls_cache.h"
     23#include "gnutls_config.h"
    2324#include "gnutls_ocsp.h"
    2425#include "gnutls_util.h"
     
    631632        sc->cache_enable = sc_base->cache_enable;
    632633        sc->cache_config = sc_base->cache_config;
    633         sc->cache_timeout = sc_base->cache_timeout;
    634634        sc->cache = sc_base->cache;
     635        if (sc->cache_timeout == MGS_TIMEOUT_UNSET)
     636            sc->cache_timeout = sc_base->cache_timeout;
    635637
    636638        sc->singleton_wd = sc_base->singleton_wd;
  • test/tests/03_cachetimeout_in_vhost/apache.conf

    rd8d6b1e rf52f1b4  
    11Include ${srcdir}/base_apache.conf
     2GnuTLSCache shmcb:cache/gnutls_cache_${TEST_NAME}
    23
    34<VirtualHost _default_:${TEST_PORT}>
    4  # Cache configuration not allowed in here:
    55 GnuTLSCacheTimeout 200
    66 ServerName ${TEST_HOST}
Note: See TracChangeset for help on using the changeset viewer.