Changeset 235e109 in mod_gnutls for src/mod_gnutls.c


Ignore:
Timestamp:
Apr 9, 2018, 2:24:59 AM (19 months ago)
Author:
Fiona Klute <fiona.klute@…>
Branches:
debian/master, debian/stretch-backports, master, upstream
Children:
23e98b3
Parents:
fe21671
Message:

Unify initialization of mod_gnutls connection context

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mod_gnutls.c

    rfe21671 r235e109  
    2020#include "mod_gnutls.h"
    2121#include "gnutls_ocsp.h"
     22#include "gnutls_util.h"
    2223
    2324#ifdef APLOG_USE_MODULE
     
    107108
    108109    /* disable TLS for this connection */
    109     mgs_handle_t *ctxt = (mgs_handle_t *)
    110         ap_get_module_config(c->conn_config, &gnutls_module);
    111     if (ctxt == NULL)
    112     {
    113         ctxt = apr_pcalloc(c->pool, sizeof (*ctxt));
    114         ap_set_module_config(c->conn_config, &gnutls_module, ctxt);
    115     }
     110    mgs_handle_t *ctxt = init_gnutls_ctxt(c);
    116111    ctxt->enabled = GNUTLS_ENABLED_FALSE;
    117112    ctxt->is_proxy = GNUTLS_ENABLED_TRUE;
     
    139134
    140135    /* enable TLS for this connection */
    141     mgs_handle_t *ctxt = (mgs_handle_t *)
    142         ap_get_module_config(c->conn_config, &gnutls_module);
    143     if (ctxt == NULL)
    144     {
    145         ctxt = apr_pcalloc(c->pool, sizeof (*ctxt));
    146         ap_set_module_config(c->conn_config, &gnutls_module, ctxt);
    147     }
     136    mgs_handle_t *ctxt = init_gnutls_ctxt(c);
    148137    ctxt->enabled = GNUTLS_ENABLED_TRUE;
    149138    ctxt->is_proxy = GNUTLS_ENABLED_TRUE;
Note: See TracChangeset for help on using the changeset viewer.