You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by mt...@apache.org on 2004/08/25 11:56:44 UTC

cvs commit: httpd-2.0/modules/proxy ajp_header.c ajp.h

mturk       2004/08/25 02:56:44

  Modified:    modules/proxy ajp_header.c ajp.h
  Log:
  Added SSL custom indicators. They can be set using SetEnv directive,
  so we don't need an extra one like the JkEnvVar is in the mod_jk.
  
  Revision  Changes    Path
  1.4       +17 -9     httpd-2.0/modules/proxy/ajp_header.c
  
  Index: ajp_header.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/proxy/ajp_header.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ajp_header.c	24 Aug 2004 11:55:23 -0000	1.3
  +++ ajp_header.c	25 Aug 2004 09:56:43 -0000	1.4
  @@ -211,7 +211,7 @@
       apr_byte_t is_ssl;
       char *remote_host;
       char *uri;
  -    const char *session_route;
  +    const char *session_route, *envvar;
       const apr_array_header_t *arr = apr_table_elts(r->subprocess_env);
       const apr_table_entry_t *elts = (const apr_table_entry_t *)arr->elts;
   
  @@ -345,10 +345,16 @@
               return APR_EGENERAL;
           }
       }
  -/* XXXX ignored for the moment
  -    if (s->ssl_cert_len) {
  +/* XXX: Is the subprocess_env a right place?
  + * <Location /examples>
  + *   ProxyPass ajp://remote:8009/servlets-examples 
  + *   SetEnv SSL_SESSION_ID CUSTOM_SSL_SESSION_ID
  + * </Location>
  + */
  +    if ((envvar = apr_table_get(r->subprocess_env,
  +                                AJP13_SSL_CLIENT_CERT_INDICATOR))) {
           if (ajp_msg_append_uint8(msg, SC_A_SSL_CERT) ||
  -            ajp_msg_append_string(msg, s->ssl_cert)) {
  +            ajp_msg_append_string(msg, envvar)) {
               ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
                      "Error ajp_marshal_into_msgb - "
                      "Error appending the SSL certificates");
  @@ -356,25 +362,27 @@
           }
       }
   
  -    if (s->ssl_cipher) {
  +    if ((envvar = apr_table_get(r->subprocess_env,
  +                                AJP13_SSL_CIPHER_INDICATOR))) {
           if (ajp_msg_append_uint8(msg, SC_A_SSL_CIPHER) ||
  -            ajp_msg_append_string(msg, s->ssl_cipher)) {
  +            ajp_msg_append_string(msg, envvar)) {
               ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
                      "Error ajp_marshal_into_msgb - "
                      "Error appending the SSL ciphers");
               return APR_EGENERAL;
           }
       }
  -    if (s->ssl_session) {
  +
  +    if ((envvar = apr_table_get(r->subprocess_env,
  +                                AJP13_SSL_SESSION_INDICATOR))) {
           if (ajp_msg_append_uint8(msg, SC_A_SSL_SESSION) ||
  -            ajp_msg_append_string(msg, s->ssl_session)) {
  +            ajp_msg_append_string(msg, envvar)) {
               ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
                      "Error ajp_marshal_into_msgb - "
                      "Error appending the SSL session");
               return APR_EGENERAL;
           }
       }
  - */
   
       /*
        * ssl_key_size is required by Servlet 2.3 API
  
  
  
  1.2       +6 -0      httpd-2.0/modules/proxy/ajp.h
  
  Index: ajp.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/proxy/ajp.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ajp.h	18 Aug 2004 16:09:27 -0000	1.1
  +++ ajp.h	25 Aug 2004 09:56:43 -0000	1.2
  @@ -47,6 +47,12 @@
   #define AJP13_DEF_PORT 8009
   #endif
   
  +/* The following environment variables match mod_ssl! */
  +#define AJP13_HTTPS_INDICATOR           "HTTPS"
  +#define AJP13_SSL_CLIENT_CERT_INDICATOR "SSL_CLIENT_CERT"
  +#define AJP13_SSL_CIPHER_INDICATOR      "SSL_CIPHER"
  +#define AJP13_SSL_SESSION_INDICATOR     "SSL_SESSION_ID"
  +#define AJP13_SSL_KEY_SIZE_INDICATOR    "SSL_CIPHER_USEKEYSIZE"
   
   #if APR_CHARSET_EBCDIC