tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From billbar...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/native/netscape jk_nsapi_plugin.c
Date Sat, 23 Oct 2004 03:02:32 GMT
billbarker    2004/10/22 20:02:32

  Modified:    jk/native/netscape jk_nsapi_plugin.c
  Log:
  Add the cert header and footer line to the SSL cert.
  
  Fix for bug #31766
  Based on submission by: Nathan Clement nclement@qvalent.com
  
  Revision  Changes    Path
  1.13      +12 -3     jakarta-tomcat-connectors/jk/native/netscape/jk_nsapi_plugin.c
  
  Index: jk_nsapi_plugin.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/netscape/jk_nsapi_plugin.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- jk_nsapi_plugin.c	8 Oct 2004 08:55:14 -0000	1.12
  +++ jk_nsapi_plugin.c	23 Oct 2004 03:02:32 -0000	1.13
  @@ -48,6 +48,9 @@
   static int init_on_other_thread_is_done = JK_FALSE;
   static int init_on_other_thread_is_ok = JK_FALSE;
   
  +static const char ssl_cert_start[] = "-----BEGIN CERTIFICATE-----\r\n";
  +static const char ssl_cert_end[] = "\r\n-----END CERTIFICATE-----\r\n";
  +
   static jk_logger_t *logger = NULL;
   static jk_worker_env_t worker_env;
   
  @@ -400,8 +403,14 @@
   
       s->ssl_key_size = -1;       /* required by Servlet 2.3 Api, added in jtc */
       if (s->is_ssl) {
  -        s->ssl_cert = pblock_findval("auth-cert", private_data->rq->vars);
  -        if (s->ssl_cert) {
  +        char *ssl_cert = pblock_findval("auth-cert", private_data->rq->vars);
  +        if (ssl_cert != NULL) {
  +            s->ssl_cert = jk_pool_alloc(s->pool, sizeof(ssl_cert_start)+
  +                                                 strlen(ssl_cert)+
  +                                                 sizeof(ssl_cert_end));
  +            strcpy(s->ssl_cert, ssl_cert_start);
  +            strcat(s->ssl_cert, ssl_cert);
  +            strcat(s->ssl_cert, ssl_cert_end);
               s->ssl_cert_len = strlen(s->ssl_cert);
           }
           s->ssl_cipher = pblock_findval("cipher", private_data->sn->client);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message