Changeset 4e388b0 in mod_gnutls


Ignore:
Timestamp:
Nov 2, 2018, 2:24:00 PM (8 months ago)
Author:
Fiona Klute <fiona.klute@…>
Branches:
debian/master, master
Children:
7f2fd55
Parents:
f06c148
Message:

Consistently use strcasecmp() instead of mixing in apr_strnatcasecmp()

Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/gnutls_config.c

    rf06c148 r4e388b0  
    659659        ap_get_module_config(parms->server->module_config, &gnutls_module);
    660660
    661     if (!apr_strnatcasecmp(parms->directive->directive, "GnuTLSCacheTimeout"))
     661    if (!strcasecmp(parms->directive->directive, "GnuTLSCacheTimeout"))
    662662        sc->cache_timeout = apr_time_from_sec(argint);
    663     else if (!apr_strnatcasecmp(parms->directive->directive,
    664                                 "GnuTLSOCSPCacheTimeout"))
     663    else if (!strcasecmp(parms->directive->directive,
     664                         "GnuTLSOCSPCacheTimeout"))
    665665        sc->ocsp_cache_time = apr_time_from_sec(argint);
    666     else if (!apr_strnatcasecmp(parms->directive->directive,
    667                                 "GnuTLSOCSPFailureTimeout"))
     666    else if (!strcasecmp(parms->directive->directive,
     667                         "GnuTLSOCSPFailureTimeout"))
    668668        sc->ocsp_failure_timeout = apr_time_from_sec(argint);
    669     else if (!apr_strnatcasecmp(parms->directive->directive,
    670                                 "GnuTLSOCSPFuzzTime"))
     669    else if (!strcasecmp(parms->directive->directive,
     670                         "GnuTLSOCSPFuzzTime"))
    671671        sc->ocsp_fuzz_time = apr_time_from_sec(argint);
    672     else if (!apr_strnatcasecmp(parms->directive->directive,
    673                                 "GnuTLSOCSPSocketTimeout"))
     672    else if (!strcasecmp(parms->directive->directive,
     673                         "GnuTLSOCSPSocketTimeout"))
    674674        sc->ocsp_socket_timeout = apr_time_from_sec(argint);
    675675    else
  • src/gnutls_hooks.c

    rf06c148 r4e388b0  
    3131#include <util_mutex.h>
    3232#include <apr_escape.h>
     33/* This provides strcmp and related functions */
     34#define APR_WANT_STRFUNC
     35#include <apr_want.h>
    3336
    3437#ifdef ENABLE_MSVA
     
    880883
    881884    /* Check ServerName First! */
    882     if(apr_strnatcasecmp(x->sni_name, s->server_hostname) == 0) {
     885    if (strcasecmp(x->sni_name, s->server_hostname) == 0) {
    883886        // We have a match, save this server configuration
    884887        x->sc = tsc;
     
    887890    } else if(s->names->nelts) {
    888891        names = s->names;
    889         name = (char **)names->elts;
     892        name = (char **) names->elts;
    890893        for (int i = 0; i < names->nelts; ++i)
    891894        {
    892             if (!name[i]) { continue; }
    893             if (apr_strnatcasecmp(x->sni_name, name[i]) == 0) {
     895            if (!name[i])
     896                continue;
     897            if (strcasecmp(x->sni_name, name[i]) == 0)
     898            {
    894899                // We have a match, save this server configuration
    895900                x->sc = tsc;
Note: See TracChangeset for help on using the changeset viewer.