hgomez      01/06/07 06:56:35

  Modified:    jk/src/native/apache-2.0 mod_jk.c
  Log:
  Updated mod_jk for Apache 2.0.
  More directives and update for wc_open (uw_map added)
  
  Revision  Changes    Path
  1.5       +59 -4     jakarta-tomcat-connectors/jk/src/native/apache-2.0/mod_jk.c
  
  Index: mod_jk.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/apache-2.0/mod_jk.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mod_jk.c  2001/06/01 09:49:56     1.4
  +++ mod_jk.c  2001/06/07 13:56:31     1.5
  @@ -118,7 +118,8 @@
       char *https_indicator;
       char *certs_indicator;
       char *cipher_indicator;
  -    char *session_indicator;
  +    char *session_indicator;  /* Servlet API 2.3 requirement */
  +     char *key_size_indicator; /* Servlet API 2.3 requirement */
   
       /*
        * Environment variables support
  @@ -437,8 +438,9 @@
       s->is_ssl       = JK_FALSE;
       s->ssl_cert     = NULL;
       s->ssl_cert_len = 0;
  -    s->ssl_cipher   = NULL;
  +    s->ssl_cipher   = NULL;          /* required by Servlet 2.3 Api, allready in 
original ajp13 */
       s->ssl_session  = NULL;
  +     s->ssl_key_size = -1;           /* required by Servlet 2.3 Api, added in jtc */
   
       if(conf->ssl_enable || conf->envvars_in_use) {
           ap_add_common_vars(r);
  @@ -451,8 +453,15 @@
                   if(s->ssl_cert) {
                       s->ssl_cert_len = strlen(s->ssl_cert);
                   }
  +                             /* Servlet 2.3 API */
                   s->ssl_cipher   = (char *)apr_table_get(r->subprocess_env, 
conf->cipher_indicator);
                   s->ssl_session  = (char *)apr_table_get(r->subprocess_env, 
conf->session_indicator);
  +
  +                /* Servlet 2.3 API */
  +                ssl_temp = (char *)apr_table_get(r->subprocess_env, 
conf->key_size_indicator);
  +                if (ssl_temp)
  +                    s->ssl_key_size = atoi(ssl_temp);
  +
               }
           }
   
  @@ -665,6 +674,12 @@
       return NULL;
   }
   
  +/*
  + * JkHTTPSIndicator Directive Handling
  + *
  + * JkHTTPSIndicator HTTPS
  + */
  +
   static const char *jk_set_https_indicator(cmd_parms *cmd,
                                             void *dummy,
                                             char *indicator)
  @@ -678,6 +693,12 @@
       return NULL;
   }
   
  +/*
  + * JkCERTSIndicator Directive Handling
  + *
  + * JkCERTSIndicator SSL_CLIENT_CERT
  + */
  +
   static const char *jk_set_certs_indicator(cmd_parms *cmd,
                                             void *dummy,
                                             char *indicator)
  @@ -691,6 +712,12 @@
       return NULL;
   }
   
  +/*
  + * JkCIPHERIndicator Directive Handling
  + *
  + * JkCIPHERIndicator SSL_CIPHER
  + */
  +
   static const char *jk_set_cipher_indicator(cmd_parms *cmd,
                                              void *dummy,
                                              char *indicator)
  @@ -704,6 +731,12 @@
       return NULL;
   }
   
  +/*
  + * JkSESSIONIndicator Directive Handling
  + *
  + * JkSESSIONIndicator SSL_SESSION_ID
  + */
  +
   static const char *jk_set_session_indicator(cmd_parms *cmd,
                                              void *dummy,
                                              char *indicator)
  @@ -717,6 +750,25 @@
       return NULL;
   }
   
  +/*
  + * JkKEYSIZEIndicator Directive Handling
  + *
  + * JkKEYSIZEIndicator SSL_CIPHER_USEKEYSIZE
  + */
  +
  +static const char *jk_set_key_size_indicator(cmd_parms *cmd,
  +                                           void *dummy,
  +                                           char *indicator)
  +{
  +    server_rec *s = cmd->server;
  +    jk_server_conf_t *conf =
  +        (jk_server_conf_t *)ap_get_module_config(s->module_config, &jk_module);
  +
  +    conf->key_size_indicator = indicator;
  +
  +    return NULL;
  +}
  +
   static const char *jk_add_env_var(cmd_parms *cmd,
                                     void *dummy,
                                     char *env_name,
  @@ -794,6 +846,7 @@
        * HTTPS - indication for SSL
        * CERTS - Base64-Der-encoded client certificates.
        * CIPHER - A string specifing the ciphers suite in use.
  +     * KEYSIZE - Size of Key used in dialogue (#bits are secure)
        * SESSION - A string specifing the current SSL session.
        */
       {"JkHTTPSIndicator", jk_set_https_indicator, NULL, RSRC_CONF, TAKE1,
  @@ -804,6 +857,8 @@
        "Name of the Apache environment that contains SSL client cipher"},
       {"JkSESSIONIndicator", jk_set_session_indicator, NULL, RSRC_CONF, TAKE1,
        "Name of the Apache environment that contains SSL session"},
  +    {"JkKEYSIZEIndicator", jk_set_key_size_indicator, NULL, RSRC_CONF, TAKE1,
  +     "Name of the Apache environment that contains SSL key size in use"},
       {"JkExtractSSL", jk_set_enable_ssl, NULL, RSRC_CONF, FLAG,
        "Turns on SSL processing and information gathering by mod_jk"},
   
  @@ -1064,7 +1119,7 @@
   
       if(map_alloc(&init_map)) {
           if(map_read_properties(init_map, conf->worker_file)) {
  -         if(wc_open(init_map, conf->log)) {
  +         if(wc_open(init_map, conf->uw_map, conf->log)) {
                return;
           }            
           }
  @@ -1099,7 +1154,7 @@
               if(map_alloc(&init_map)) {
                   if(map_read_properties(init_map, conf->worker_file)) {
                                        ap_add_version_component(pconf, 
JK_EXPOSED_VERSION);
  -                        if(wc_open(init_map, conf->log)) {
  +                        if(wc_open(init_map, conf->uw_map, conf->log)) {
                               return;
                           }            
                   }
  
  
  

Reply via email to