httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Poirier <poir...@pobox.com>
Subject Re: svn commit: r829619 - in /httpd/httpd/trunk: ./ modules/ssl/
Date Mon, 26 Oct 2009 12:37:24 GMT
jorton@apache.org writes:

> Author: jorton
> Date: Sun Oct 25 17:21:10 2009
> New Revision: 829619
...
> +const char *ssl_cmd_SSLStaplingResponseTimeSkew(cmd_parms *cmd, void *dcfg,
> +                                                    const char *arg)
> +{
> +    SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
> +    sc->server->stapling_resptime_skew = atoi(arg);
> +    if (sc->server->stapling_resptime_skew < 0) {
> +        return "SSLstapling_resptime_skew: invalid argument";
> +    }
> +    return NULL;
> +}
> +
> +const char *ssl_cmd_SSLStaplingResponseMaxAge(cmd_parms *cmd, void *dcfg,
> +                                                    const char *arg)
> +{
> +    SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
> +    sc->server->stapling_resp_maxage = atoi(arg);
> +    if (sc->server->stapling_resp_maxage < 0) {
> +        return "SSLstapling_resp_maxage: invalid argument";
> +    }
> +    return NULL;
> +}
> +
> +const char *ssl_cmd_SSLStaplingStandardCacheTimeout(cmd_parms *cmd, void *dcfg,
> +                                                    const char *arg)
> +{
> +    SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
> +    sc->server->stapling_cache_timeout = atoi(arg);
> +    if (sc->server->stapling_cache_timeout < 0) {
> +        return "SSLstapling_cache_timeout: invalid argument";
> +    }
> +    return NULL;
> +}
> +
> +const char *ssl_cmd_SSLStaplingErrorCacheTimeout(cmd_parms *cmd, void *dcfg,
> +                                                 const char *arg)
> +{
> +    SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
> +    sc->server->stapling_errcache_timeout = atoi(arg);
> +    if (sc->server->stapling_errcache_timeout < 0) {
> +        return "SSLstapling_errcache_timeout: invalid argument";
> +    }
> +    return NULL;
> +}
...
> +const char *ssl_cmd_SSLStaplingResponderTimeout(cmd_parms *cmd, void *dcfg,
> +                                                const char *arg)
> +{
> +    SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
> +    sc->server->stapling_responder_timeout = atoi(arg);
> +    sc->server->stapling_responder_timeout *= APR_USEC_PER_SEC;
> +    if (sc->server->stapling_responder_timeout < 0) {
> +        return "SSLstapling_responder_timeout: invalid argument";
> +    }
> +    return NULL;
> +}

Shouldn't we check these arguments for validity before using them,
rather than after?

Dan

Mime
View raw message