Complete move of Key into le_util

This commit is contained in:
Seth Schoen 2015-02-06 15:54:08 -08:00
parent 31b1369752
commit 52d1989850
5 changed files with 8 additions and 6 deletions

View file

@ -22,7 +22,7 @@ from letsencrypt.client import reverter
from letsencrypt.client import revoker
from letsencrypt.client.apache import configurator
from letsencrypt.le_util import Key
from letsencrypt.client.le_util import Key
class Client(object):

View file

@ -15,6 +15,7 @@ from letsencrypt.client.apache import obj
from letsencrypt.client.apache import parser
from letsencrypt.client.tests.apache import util
from letsencrypt.client.le_util import Key
class TwoVhost80Test(util.ApacheTest):
@ -164,7 +165,7 @@ class TwoVhost80Test(util.ApacheTest):
def test_perform(self, mock_restart, mock_dvsni_perform):
# Only tests functionality specific to configurator.perform
# Note: As more challenges are offered this will have to be expanded
auth_key = client.Client.Key(self.rsa256_file, self.rsa256_pem)
auth_key = Key(self.rsa256_file, self.rsa256_pem)
chall1 = challenge_util.DvsniChall(
"encryption-example.demo",
"jIq_Xy1mXGN37tb4L6Xj_es58fW571ZNyXekdZzhh7Q",

View file

@ -10,7 +10,7 @@ from letsencrypt.client import client
from letsencrypt.client import CONFIG
from letsencrypt.client.tests.apache import util
from letsencrypt.client.le_util import Key
class DvsniPerformTest(util.ApacheTest):
"""Test the ApacheDVSNI challenge."""
@ -33,7 +33,7 @@ class DvsniPerformTest(util.ApacheTest):
rsa256_pem = pkg_resources.resource_string(
"letsencrypt.client.tests", 'testdata/rsa256_key.pem')
auth_key = client.Client.Key(rsa256_file, rsa256_pem)
auth_key = Key(rsa256_file, rsa256_pem)
self.challs = []
self.challs.append(challenge_util.DvsniChall(
"encryption-example.demo",

View file

@ -23,7 +23,7 @@ class DvsniGenCertTest(unittest.TestCase):
r_b64 = le_util.jose_b64encode(dvsni_r)
pem = pkg_resources.resource_string(
__name__, os.path.join("testdata", "rsa256_key.pem"))
key = client.Client.Key("path", pem)
key = le_util.Key("path", pem)
nonce = "12345ABCDE"
cert_pem, s_b64 = self._call(domain, r_b64, nonce, key)

View file

@ -19,6 +19,7 @@ from letsencrypt.client import display
from letsencrypt.client import errors
from letsencrypt.client import interfaces
from letsencrypt.client import log
from letsencrypt.client.le_util import Key
def main(): # pylint: disable=too-many-statements,too-many-branches
@ -118,7 +119,7 @@ def main(): # pylint: disable=too-many-statements,too-many-branches
if args.privkey is None:
privkey = client.init_key(args.key_size)
else:
privkey = client.Client.Key(args.privkey[0], args.privkey[1])
privkey = Key(args.privkey[0], args.privkey[1])
acme = client.Client(args.server, privkey, auth, installer)