Changeset c3ad933 in mod_gnutls


Ignore:
Timestamp:
Jun 3, 2016, 2:31:56 PM (3 years ago)
Author:
Thomas Klute <thomas2.klute@…>
Branches:
debian/master, debian/stretch-backports, master, upstream
Children:
8913410
Parents:
fd6bb19
Message:

Remove stale support code for Apache versions before 2.2

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • include/mod_gnutls.h.in

    rfd6bb19 rc3ad933  
    5959/* Module Debug Mode */
    6060#define MOD_GNUTLS_DEBUG @OOO_MAINTAIN@
    61 
    62 /*
    63  * Recent Versions of 2.1 renamed several hooks.
    64  * This allows us to compile on 2.0.xx
    65  */
    66 #if AP_SERVER_MINORVERSION_NUMBER >= 2 || (AP_SERVER_MINORVERSION_NUMBER == 1 && AP_SERVER_PATCHLEVEL_NUMBER >= 3)
    67         #define USING_2_1_RECENT 1
    68 #else
    69         #define USING_2_1_RECENT 0
    70 #endif
    7161
    7262/* mod_gnutls Cache Types */
  • src/gnutls_hooks.c

    rfd6bb19 rc3ad933  
    3434#endif
    3535
    36 #if !USING_2_1_RECENT
    37 extern server_rec *ap_server_conf;
    38 #endif
    39 
    4036#if MOD_GNUTLS_DEBUG
    4137static apr_file_t *debug_log_fp;
     
    565561
    566562#define MAX_HOST_LEN 255
    567 
    568 #if USING_2_1_RECENT
    569563
    570564typedef struct {
     
    653647        return check_server_aliases(x, s, tsc);
    654648}
    655 #endif
    656649
    657650mgs_srvconf_rec *mgs_find_sni_server(gnutls_session_t session)
     
    662655    char sni_name[MAX_HOST_LEN];
    663656    mgs_handle_t *ctxt;
    664 #if USING_2_1_RECENT
    665657    vhost_cb_rec cbx;
    666 #else
    667     server_rec *s;
    668     mgs_srvconf_rec *tsc;
    669 #endif
    670658
    671659    if (session == NULL)
     
    694682     * for this IP/Port combo.  Trust that the core did the 'right' thing.
    695683     */
    696 #if USING_2_1_RECENT
    697684    cbx.ctxt = ctxt;
    698685    cbx.sc = NULL;
     
    703690        return cbx.sc;
    704691    }
    705 #else
    706     for (s = ap_server_conf; s; s = s->next) {
    707 
    708         tsc = (mgs_srvconf_rec *) ap_get_module_config(s->module_config,
    709                                                        &gnutls_module);
    710 
    711         if (tsc->enabled != GNUTLS_ENABLED_TRUE) { continue; }
    712 
    713         if(check_server_aliases(x, s, tsc)) {
    714             return tsc;
    715         }
    716     }
    717 #endif
    718692    return NULL;
    719693}
  • src/gnutls_io.c

    rfd6bb19 rc3ad933  
    401401    if (maxtries < 1) {
    402402        ctxt->status = -1;
    403 #if USING_2_1_RECENT
    404403        ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, ctxt->c,
    405404                "GnuTLS: Handshake Failed. Hit Maximum Attempts");
    406 #else
    407         ap_log_error(APLOG_MARK, APLOG_ERR, 0,
    408                 ctxt->c->base_server,
    409                 "GnuTLS: Handshake Failed. Hit Maximum Attempts");
    410 #endif
    411405        if (ctxt->session) {
    412406            gnutls_alert_send(ctxt->session, GNUTLS_AL_FATAL,
     
    437431            goto tryagain;
    438432        }
    439 #if USING_2_1_RECENT
    440433        ap_log_cerror(APLOG_MARK, APLOG_INFO, 0, ctxt->c,
    441434                "GnuTLS: Handshake Failed (%d) '%s'", ret,
    442435                gnutls_strerror(ret));
    443 #else
    444         ap_log_error(APLOG_MARK, APLOG_INFO, 0,
    445                 ctxt->c->base_server,
    446                 "GnuTLS: Handshake Failed (%d) '%s'", ret,
    447                 gnutls_strerror(ret));
    448 #endif
    449436        ctxt->status = -1;
    450437        if (ctxt->session) {
  • src/mod_gnutls.c

    rfd6bb19 rc3ad933  
    3333                        APR_HOOK_REALLY_LAST);
    3434    /* HTTP Scheme Hook */
    35 #if USING_2_1_RECENT
    3635    ap_hook_http_scheme(mgs_hook_http_scheme, NULL, NULL, APR_HOOK_MIDDLE);
    37 #else
    38     ap_hook_http_method(mgs_hook_http_scheme, NULL, NULL, APR_HOOK_MIDDLE);
    39 #endif
    4036    /* Default Port Hook */
    4137    ap_hook_default_port(mgs_hook_default_port, NULL, NULL, APR_HOOK_MIDDLE);
Note: See TracChangeset for help on using the changeset viewer.