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 ssl_engine_vars.c
Date Sat, 28 Feb 2004 23:03:15 GMT
jorton      2004/02/28 15:03:15

  Modified:    modules/ssl ssl_engine_vars.c
  Log:
  * modules/ssl/ssl_engine_vars.c (ssl_var_lookup_ssl_cert_dn): Simplify
  to use apr_pstrmemdup.
  
  Revision  Changes    Path
  1.36      +5 -8      httpd-2.0/modules/ssl/ssl_engine_vars.c
  
  Index: ssl_engine_vars.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_vars.c,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -w -d -u -r1.35 -r1.36
  --- ssl_engine_vars.c	28 Feb 2004 22:56:01 -0000	1.35
  +++ ssl_engine_vars.c	28 Feb 2004 23:03:15 -0000	1.36
  @@ -376,8 +376,6 @@
       char *result, *ptr;
       X509_NAME_ENTRY *xsne;
       int i, j, n, idx = 0;
  -    unsigned char *data_ptr;
  -    int data_len;
       apr_size_t varlen;
   
       /* if an _N suffix is used, find the Nth attribute of given name */
  @@ -401,16 +399,15 @@
                                                X509_NAME_get_entries(xsname), j);
   
                   n =OBJ_obj2nid((ASN1_OBJECT *)X509_NAME_ENTRY_get_object(xsne));
  -                data_ptr = X509_NAME_ENTRY_get_data_ptr(xsne);
  -                data_len = X509_NAME_ENTRY_get_data_len(xsne);
   
                   if (n == ssl_var_lookup_ssl_cert_dn_rec[i].nid && idx-- == 0) {
  -                    result = apr_palloc(p, data_len+1);
  -                    apr_cpystrn(result, (char *)data_ptr, data_len+1);
  +                    result = apr_pstrmemdup(p, 
  +                                            X509_NAME_ENTRY_get_data_ptr(xsne),
  +                                            X509_NAME_ENTRY_get_data_len(xsne));
   #ifdef CHARSET_EBCDIC
  -                    ascii2ebcdic(result, result, xsne->value->length);
  +                    ascii2ebcdic(result, result, 
  +                                 X509_NAME_ENTRY_get_data_len(xsne));
   #endif /* CHARSET_EBCDIC */
  -                    result[data_len] = NUL;
                       break;
                   }
               }
  
  
  

Mime
View raw message