Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8CA00DC48 for ; Mon, 17 Dec 2012 08:46:16 +0000 (UTC) Received: (qmail 22510 invoked by uid 500); 17 Dec 2012 08:46:15 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 22432 invoked by uid 500); 17 Dec 2012 08:46:15 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 22393 invoked by uid 99); 17 Dec 2012 08:46:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Dec 2012 08:46:14 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS,T_FRT_SLUT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [80.12.242.131] (HELO smtp.smtpout.orange.fr) (80.12.242.131) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Dec 2012 08:46:05 +0000 Received: from [127.0.0.1] ([92.140.159.239]) by mwinf5d17 with ME id cYlj1k00M5AC5D003YljRG; Mon, 17 Dec 2012 09:45:44 +0100 Message-ID: <50CEDBB6.3030609@wanadoo.fr> Date: Mon, 17 Dec 2012 09:45:42 +0100 From: Marion & Christophe JAILLET User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Stefan Fritsch CC: dev@httpd.apache.org Subject: Re: svn commit: r1422549 - in /httpd/httpd/trunk: include/ap_mmn.h include/httpd.h server/util.c server/util_md5.c References: <20121216114916.8C9E12388AA6@eris.apache.org> <50CE2D99.3070705@wanadoo.fr> <201212170020.10707.sf@apache.org> In-Reply-To: <201212170020.10707.sf@apache.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Antivirus: avast! (VPS 121216-1, 16/12/2012), Outbound message X-Antivirus-Status: Clean X-Virus-Checked: Checked by ClamAV on apache.org Le 17/12/2012 00:20, Stefan Fritsch a écrit : > +AP_DECLARE(void) ap_bin2hex(const void *src, apr_size_t srclen, > char *dest) +{ > + const unsigned char *in = src; > + unsigned char *out = (unsigned char *)dest; > + apr_size_t i; > + > + for (i = 0; i < srclen; i++) { > + *out++ = c2x_table[in[i] >> 4]; > + *out++ = c2x_table[in[i] & 0xf]; > + } > + *out = '\0'; > +} > + The following functions: SSL_SESSION_id2sz, in ssl_util_ssl.c, line 487 socache_mc_id2key, in mod_socache_memcache.c, line 193 log_xlate_error, in mod_charset_lite.c, line 498 add_password, in htdigest.c, line 157 could also benefit from it. However, some use uppercase HEX representation. add_password is not an issue. socache_mc_id2key should not be an issue, the generated string is only used with apr_memcache_[set|getp|delete]. log_xlate_error should not be an issue, the generated string is only used for logging. *But* SSL_SESSION_id2sz could be an issue. Do you think it could be a win ? Do you think it would be useful to pass an extra parameter to ap_bin2hex in order to tell if the conversion should be done using abcdef or ABCDEF ? Thanks for your comment. CJ