From: david-sarah Date: Wed, 10 Aug 2011 20:23:10 +0000 (-0700) Subject: Replace the hard-coded 522-bit RSA key size used for tests with a TEST_RSA_KEY_SIZE... X-Git-Tag: trac-5200~6 X-Git-Url: https://git.rkrishnan.org/vdrive/%22file:/%22news.html/$rel_link?a=commitdiff_plain;h=c55c44e70a73c2a67311eb9764c6d92acf829d3b;p=tahoe-lafs%2Ftahoe-lafs.git Replace the hard-coded 522-bit RSA key size used for tests with a TEST_RSA_KEY_SIZE constant defined in test/common.py (part 2). refs #393 --- diff --git a/src/allmydata/test/common.py b/src/allmydata/test/common.py index d728bcb0..0be410be 100644 --- a/src/allmydata/test/common.py +++ b/src/allmydata/test/common.py @@ -26,6 +26,7 @@ from allmydata.key_generator import KeyGeneratorService import allmydata.test.common_util as testutil from allmydata import immutable +TEST_RSA_KEY_SIZE = 2048 def flush_but_dont_ignore(res): d = flushEventualQueue() diff --git a/src/allmydata/test/no_network.py b/src/allmydata/test/no_network.py index 4730a952..f510544b 100644 --- a/src/allmydata/test/no_network.py +++ b/src/allmydata/test/no_network.py @@ -27,6 +27,8 @@ from allmydata.util import fileutil, idlib, hashutil from allmydata.util.hashutil import sha1 from allmydata.test.common_web import HTTPClientGETFactory from allmydata.interfaces import IStorageBroker +from allmydata.test.common import TEST_RSA_KEY_SIZE + class IntentionalError(Exception): pass diff --git a/src/allmydata/test/test_keygen.py b/src/allmydata/test/test_keygen.py index c282a888..fe459cfb 100644 --- a/src/allmydata/test/test_keygen.py +++ b/src/allmydata/test/test_keygen.py @@ -7,6 +7,7 @@ from foolscap.api import Tub, fireEventually, flushEventualQueue from allmydata import key_generator from allmydata.util import pollmixin +from allmydata.test.common import TEST_RSA_KEY_SIZE from pycryptopp.publickey import rsa def flush_but_dont_ignore(res): diff --git a/src/allmydata/test/test_mutable.py b/src/allmydata/test/test_mutable.py index 1ef424da..1b7fc9fb 100644 --- a/src/allmydata/test/test_mutable.py +++ b/src/allmydata/test/test_mutable.py @@ -35,6 +35,8 @@ from allmydata.mutable.layout import unpack_header, MDMFSlotReadProxy from allmydata.mutable.repairer import MustForceRepairError import allmydata.test.common_util as testutil +from allmydata.test.common import TEST_RSA_KEY_SIZE + # this "FakeStorage" exists to put the share data in RAM and avoid using real # network connections, both to speed up the tests and to reduce the amount of