httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject cvs commit: httpd-2.0/modules/ssl mod_ssl.c ssl_engine_config.c ssl_engine_kernel.c ssl_private.h
Date Thu, 03 Jun 2004 15:00:16 GMT
jorton      2004/06/03 08:00:16

  Modified:    .        CHANGES
               modules/ssl mod_ssl.c ssl_engine_config.c
                        ssl_engine_kernel.c ssl_private.h
  Log:
  Add "SSLUserName" directive to set r->user based on a chosen SSL
  environment variable name.
  
  * modules/ssl/ssl_private.h (struct SSLDirConfigRec): Add
  szUserName field.
  
  * modules/ssl/ssl_engine_config.c (ssl_config_perdir_create,
  ssl_config_perdir_merge): Initialize and merge szUserName field.
  (ssl_cmd_SSLUserName): New function.
  
  * modules/ssl/ssl_engine_kernel.c (ssl_hook_Fixup): Set r->user to
   the value of the chosen SSL environment variable.
  
  * modules/ssl/mod_ssl.c: Add SSLUserName config directive.
  
  PR: 20957
  Submitted by: Martin v. Loewis <martin v.loewis.de>
  
  Revision  Changes    Path
  1.1505    +6 -2      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.1504
  retrieving revision 1.1505
  diff -d -w -u -r1.1504 -r1.1505
  --- CHANGES	3 Jun 2004 13:05:15 -0000	1.1504
  +++ CHANGES	3 Jun 2004 15:00:14 -0000	1.1505
  @@ -2,10 +2,14 @@
   
     [Remove entries to the current 2.0 section below, when backported]
   
  +  *) mod_ssl: Add "SSLUserName" directive to set r->user based on a
  +     chosen SSL environment variable.  PR 20957. 
  +     [Martin v. Loewis <martin v.loewis.de>]
  +
     *) mod_ssl: Add "SSLHonorCipherOrder" directive to enable the
        OpenSSL 0.9.7 flag which uses the server's cipher order rather
  -     than the client's.  
  -     PR 28665.  [Jim Schneider <jschneid netilla.com>]
  +     than the client's.  PR 28665.
  +     [Jim Schneider <jschneid netilla.com>]
   
     *) mod_ssl: Drop support for the CompatEnvVars argument to
        SSLOptions, which was never actually implemented in 2.0.
  
  
  
  1.99      +2 -0      httpd-2.0/modules/ssl/mod_ssl.c
  
  Index: mod_ssl.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/mod_ssl.c,v
  retrieving revision 1.98
  retrieving revision 1.99
  diff -d -w -u -r1.98 -r1.99
  --- mod_ssl.c	3 Jun 2004 13:03:07 -0000	1.98
  +++ mod_ssl.c	3 Jun 2004 15:00:15 -0000	1.99
  @@ -136,6 +136,8 @@
                   "(`[+-][SSLv2|SSLv3|TLSv1] ...' - see manual)")
       SSL_CMD_SRV(HonorCipherOrder, FLAG,
                   "Use the server's cipher ordering preference")
  +    SSL_CMD_ALL(UserName, TAKE1,
  +		"Set user name to SSL variable value")
   
       /* 
        * Proxy configuration for remote SSL connections
  
  
  
  1.94      +9 -0      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.93
  retrieving revision 1.94
  diff -d -w -u -r1.93 -r1.94
  --- ssl_engine_config.c	3 Jun 2004 13:03:08 -0000	1.93
  +++ ssl_engine_config.c	3 Jun 2004 15:00:15 -0000	1.94
  @@ -288,6 +288,7 @@
   
       dc->szCACertificatePath    = NULL;
       dc->szCACertificateFile    = NULL;
  +    dc->szUserName             = NULL;
   
       return dc;
   }
  @@ -324,6 +325,7 @@
   
       cfgMergeString(szCACertificatePath);
       cfgMergeString(szCACertificateFile);
  +    cfgMergeString(szUserName);
   
       return mrg;
   }
  @@ -1372,3 +1374,10 @@
   }
   
   
  +const char *ssl_cmd_SSLUserName(cmd_parms *cmd, void *dcfg, 
  +				const char *arg)
  +{
  +    SSLDirConfigRec *dc = (SSLDirConfigRec *)dcfg;
  +    dc->szUserName = arg;
  +    return NULL;
  +}
  
  
  
  1.107     +11 -0     httpd-2.0/modules/ssl/ssl_engine_kernel.c
  
  Index: ssl_engine_kernel.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_kernel.c,v
  retrieving revision 1.106
  retrieving revision 1.107
  diff -d -w -u -r1.106 -r1.107
  --- ssl_engine_kernel.c	25 May 2004 12:09:01 -0000	1.106
  +++ ssl_engine_kernel.c	3 Jun 2004 15:00:15 -0000	1.107
  @@ -1025,6 +1025,17 @@
       }
   
       /*
  +     * Set r->user if requested
  +     */
  +    if (dc->szUserName) {
  +        val = ssl_var_lookup(r->pool, r->server, r->connection, 
  +                             r, (char *)dc->szUserName);
  +        if (val && val[0]) {
  +            r->user = val;
  +        }
  +    }
  +
  +    /*
        * Annotate the SSI/CGI environment with standard SSL information
        */
       /* the always present HTTPS (=HTTP over SSL) flag! */
  
  
  
  1.7       +3 -1      httpd-2.0/modules/ssl/ssl_private.h
  
  Index: ssl_private.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_private.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -d -w -u -r1.6 -r1.7
  --- ssl_private.h	3 Jun 2004 13:03:08 -0000	1.6
  +++ ssl_private.h	3 Jun 2004 15:00:15 -0000	1.7
  @@ -455,6 +455,7 @@
       int           nVerifyDepth;
       const char   *szCACertificatePath;
       const char   *szCACertificateFile;
  +    const char   *szUserName;
   } SSLDirConfigRec;
   
   /*
  @@ -497,6 +498,7 @@
   const char  *ssl_cmd_SSLOptions(cmd_parms *, void *, const char *);
   const char  *ssl_cmd_SSLRequireSSL(cmd_parms *, void *);
   const char  *ssl_cmd_SSLRequire(cmd_parms *, void *, const char *);
  +const char  *ssl_cmd_SSLUserName(cmd_parms *, void *, const char *);
   
   const char *ssl_cmd_SSLProxyEngine(cmd_parms *cmd, void *dcfg, int flag);
   const char  *ssl_cmd_SSLProxyProtocol(cmd_parms *, void *, const char *);
  
  
  

Mime
View raw message