Return-Path: X-Original-To: apmail-subversion-commits-archive@minotaur.apache.org Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 352939CB0 for ; Wed, 4 Apr 2012 13:25:21 +0000 (UTC) Received: (qmail 34483 invoked by uid 500); 4 Apr 2012 13:25:20 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 34463 invoked by uid 500); 4 Apr 2012 13:25:20 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 34456 invoked by uid 99); 4 Apr 2012 13:25:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Apr 2012 13:25:20 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Apr 2012 13:25:19 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 8249C23889E7; Wed, 4 Apr 2012 13:24:59 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1309370 - /subversion/trunk/subversion/libsvn_subr/crypto.c Date: Wed, 04 Apr 2012 13:24:59 -0000 To: commits@subversion.apache.org From: cmpilato@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120404132459.8249C23889E7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: cmpilato Date: Wed Apr 4 13:24:59 2012 New Revision: 1309370 URL: http://svn.apache.org/viewvc?rev=1309370&view=rev Log: * subversion/libsvn_subr/crypto.c Mostly remove a partially-implemented more-randomer-randomness implemention, leaving just a single explanatory comment and structure member pointing us in the right direction should we choose to travel that road. Modified: subversion/trunk/subversion/libsvn_subr/crypto.c Modified: subversion/trunk/subversion/libsvn_subr/crypto.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/crypto.c?rev=1309370&r1=1309369&r2=1309370&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_subr/crypto.c (original) +++ subversion/trunk/subversion/libsvn_subr/crypto.c Wed Apr 4 13:24:59 2012 @@ -37,21 +37,17 @@ #define NUM_ITERATIONS 1000 -/* Set this define if we need stronger randomness. (Or if that - decision is permanent, just remove this #define and enable the code - below which uses it to conditionalize functionality.) */ -#define NEED_RANDOMER_RANDOMNESS 0 - - /* A structure for containing Subversion's cryptography-related bits (so we can avoid passing around APR-isms outside this module). */ struct svn_crypto__ctx_t { apr_crypto_t *crypto; /* APR cryptography context. */ -#if NEED_RANDOMER_RANDOMNESS - /* ### For now, we will use apr_generate_random_bytes(). If we need more - ### strength, then we can use that function to generate entropy for - ### seeding apr_random_t. See httpd/server/core.c:ap_init_rng() */ +#if 0 + /* ### For now, we will use apr_generate_random_bytes(). If we need + ### more strength, then we can set this member using + ### apr_random_standard_new(), then use + ### apr_generate_random_bytes() to generate entropy for seeding + ### apr_random_t. See httpd/server/core.c:ap_init_rng() */ apr_random_t *rand; #endif }; @@ -174,11 +170,6 @@ svn_crypto__context_create(svn_crypto__c *ctx = apr_palloc(result_pool, sizeof(**ctx)); -#if NEED_RANDOMER_RANDOMNESS - /* ### Seeding with entropy is needed. See svn_crypto__ctx_t comments. */ - ctx->rand = apr_random_standard_new(result_pool); -#endif - apr_err = apr_crypto_get_driver(&driver, "openssl", NULL, &apu_err, result_pool); /* Potential bugs in get_driver() imply we might get APR_SUCCESS and NULL.