httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@apache.org
Subject cvs commit: httpd-2.0/modules/ssl ssl_engine_config.c
Date Tue, 12 Mar 2002 21:06:17 GMT
dougm       02/03/12 13:06:17

  Modified:    modules/ssl ssl_engine_config.c
  Log:
  moving SSLVerifyClient directive parsing into ssl_cmd_verify_parse
  function, which can also be used for SSLProxyVerify directive.
  
  dropping support for undocumented integer form of levels (0..3)
  
  Revision  Changes    Path
  1.32      +29 -15    httpd-2.0/modules/ssl/ssl_engine_config.c
  
  Index: ssl_engine_config.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_config.c,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- ssl_engine_config.c	12 Mar 2002 19:47:16 -0000	1.31
  +++ ssl_engine_config.c	12 Mar 2002 21:06:17 -0000	1.32
  @@ -722,29 +722,43 @@
       return NULL;
   }
   
  -const char *ssl_cmd_SSLVerifyClient(cmd_parms *cmd, void *ctx,
  -                                    const char *level)
  +static const char *ssl_cmd_verify_parse(cmd_parms *parms,
  +                                        const char *arg,
  +                                        ssl_verify_t *id)
   {
  -    SSLDirConfigRec *dc = (SSLDirConfigRec *)ctx;
  -    SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
  -    ssl_verify_t id;
  -
  -    if (strEQ(level, "0") || strcEQ(level, "none")) {
  -        id = SSL_CVERIFY_NONE;
  +    if (strcEQ(arg, "none") || strcEQ(arg, "off")) {
  +        *id = SSL_CVERIFY_NONE;
       }
  -    else if (strEQ(level, "1") || strcEQ(level, "optional")) {
  -        id = SSL_CVERIFY_OPTIONAL;
  +    else if (strcEQ(arg, "optional")) {
  +        *id = SSL_CVERIFY_OPTIONAL;
       }
  -    else if (strEQ(level, "2") || strcEQ(level, "require")) {
  -        id = SSL_CVERIFY_REQUIRE;
  +    else if (strcEQ(arg, "require") || strcEQ(arg, "on")) {
  +        *id = SSL_CVERIFY_REQUIRE;
       }
  -    else if (strEQ(level, "3") || strcEQ(level, "optional_no_ca")) {
  -        id = SSL_CVERIFY_OPTIONAL_NO_CA;
  +    else if (strcEQ(arg, "optional_no_ca")) {
  +        *id = SSL_CVERIFY_OPTIONAL_NO_CA;
       }
       else {
  -        return "SSLVerifyClient: Invalid argument";
  +        return apr_pstrcat(parms->temp_pool, parms->cmd->name,
  +                           ": Invalid argument '", arg, "'",
  +                           NULL);
       }
   
  +    return NULL;
  +}
  +
  +const char *ssl_cmd_SSLVerifyClient(cmd_parms *cmd, void *ctx,
  +                                    const char *arg)
  +{
  +    SSLDirConfigRec *dc = (SSLDirConfigRec *)ctx;
  +    SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
  +    ssl_verify_t id;
  +    const char *err;
  +
  +    if ((err = ssl_cmd_verify_parse(cmd, arg, &id))) {
  +        return err;
  +    }
  +    
       if (!(cmd->path || dc)) {
           sc->nVerifyClient = id;
       }
  
  
  

Mime
View raw message