Changeset d036f96 in mod_gnutls for src/gnutls_config.c


Ignore:
Timestamp:
May 8, 2018, 3:04:41 PM (2 years ago)
Author:
Fiona Klute <fiona.klute@…>
Branches:
debian/master, master, proxy-ticket
Children:
babdb29
Parents:
13870b7
Message:

Add configuration directive GnuTLSOCSPCache (no-op for now)

First step to a separate cache for OCSP data.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gnutls_config.c

    r13870b7 rd036f96  
    592592        return err;
    593593
     594    unsigned char enable = GNUTLS_ENABLED_TRUE;
    594595    /* none: disable cache */
    595596    if (strcasecmp("none", type) == 0)
    596     {
    597         sc->cache_enable = GNUTLS_ENABLED_FALSE;
    598         return NULL;
    599     }
    600 
    601     sc->cache_enable = GNUTLS_ENABLED_TRUE;
     597        enable = GNUTLS_ENABLED_FALSE;
    602598
    603599    /* Try to split socache "type:config" style configuration */
     
    615611    }
    616612
    617     return mgs_cache_inst_config(&sc->cache, parms->server,
     613    mgs_cache_t *cache = NULL;
     614    /* parms->directive->directive contains the directive string */
     615    if (!strcasecmp(parms->directive->directive, "GnuTLSCache"))
     616    {
     617        if (enable == GNUTLS_ENABLED_FALSE)
     618        {
     619            sc->cache_enable = GNUTLS_ENABLED_FALSE;
     620            return NULL;
     621        }
     622        sc->cache_enable = GNUTLS_ENABLED_TRUE;
     623        cache = &sc->cache;
     624    }
     625    else if (!strcasecmp(parms->directive->directive, "GnuTLSOCSPCache"))
     626    {
     627        // TODO
     628        return NULL;
     629    }
     630    else
     631        return apr_psprintf(parms->temp_pool, "Internal Error: %s "
     632                            "called for unknown directive %s",
     633                            __func__, parms->directive->directive);
     634
     635    return mgs_cache_inst_config(cache, parms->server,
    618636                                 type, arg,
    619637                                 parms->pool, parms->temp_pool);
Note: See TracChangeset for help on using the changeset viewer.