mirror of
https://github.com/certbot/certbot.git
synced 2026-07-30 18:04:31 +02:00
Change Key to le_util.Key
This commit is contained in:
@@ -22,7 +22,6 @@ from letsencrypt.client import reverter
|
|||||||
from letsencrypt.client import revoker
|
from letsencrypt.client import revoker
|
||||||
|
|
||||||
from letsencrypt.client.apache import configurator
|
from letsencrypt.client.apache import configurator
|
||||||
from letsencrypt.client.le_util import Key
|
|
||||||
|
|
||||||
|
|
||||||
class Client(object):
|
class Client(object):
|
||||||
@@ -365,7 +364,7 @@ def init_key(key_size):
|
|||||||
|
|
||||||
logging.info("Generating key (%d bits): %s", key_size, key_filename)
|
logging.info("Generating key (%d bits): %s", key_size, key_filename)
|
||||||
|
|
||||||
return Key(key_filename, key_pem)
|
return le_util.Key(key_filename, key_pem)
|
||||||
|
|
||||||
|
|
||||||
def init_csr(privkey, names):
|
def init_csr(privkey, names):
|
||||||
|
|||||||
@@ -8,13 +8,13 @@ import mock
|
|||||||
|
|
||||||
from letsencrypt.client import challenge_util
|
from letsencrypt.client import challenge_util
|
||||||
from letsencrypt.client import errors
|
from letsencrypt.client import errors
|
||||||
|
from letsencrypt.client import le_util
|
||||||
|
|
||||||
from letsencrypt.client.apache import configurator
|
from letsencrypt.client.apache import configurator
|
||||||
from letsencrypt.client.apache import obj
|
from letsencrypt.client.apache import obj
|
||||||
from letsencrypt.client.apache import parser
|
from letsencrypt.client.apache import parser
|
||||||
|
|
||||||
from letsencrypt.client.tests.apache import util
|
from letsencrypt.client.tests.apache import util
|
||||||
from letsencrypt.client.le_util import Key
|
|
||||||
|
|
||||||
|
|
||||||
class TwoVhost80Test(util.ApacheTest):
|
class TwoVhost80Test(util.ApacheTest):
|
||||||
@@ -164,7 +164,7 @@ class TwoVhost80Test(util.ApacheTest):
|
|||||||
def test_perform(self, mock_restart, mock_dvsni_perform):
|
def test_perform(self, mock_restart, mock_dvsni_perform):
|
||||||
# Only tests functionality specific to configurator.perform
|
# Only tests functionality specific to configurator.perform
|
||||||
# Note: As more challenges are offered this will have to be expanded
|
# Note: As more challenges are offered this will have to be expanded
|
||||||
auth_key = Key(self.rsa256_file, self.rsa256_pem)
|
auth_key = le_util.Key(self.rsa256_file, self.rsa256_pem)
|
||||||
chall1 = challenge_util.DvsniChall(
|
chall1 = challenge_util.DvsniChall(
|
||||||
"encryption-example.demo",
|
"encryption-example.demo",
|
||||||
"jIq_Xy1mXGN37tb4L6Xj_es58fW571ZNyXekdZzhh7Q",
|
"jIq_Xy1mXGN37tb4L6Xj_es58fW571ZNyXekdZzhh7Q",
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ import mock
|
|||||||
|
|
||||||
from letsencrypt.client import challenge_util
|
from letsencrypt.client import challenge_util
|
||||||
from letsencrypt.client import CONFIG
|
from letsencrypt.client import CONFIG
|
||||||
|
from letsencrypt.client import le_util
|
||||||
|
|
||||||
from letsencrypt.client.tests.apache import util
|
from letsencrypt.client.tests.apache import util
|
||||||
from letsencrypt.client.le_util import Key
|
|
||||||
|
|
||||||
class DvsniPerformTest(util.ApacheTest):
|
class DvsniPerformTest(util.ApacheTest):
|
||||||
"""Test the ApacheDVSNI challenge."""
|
"""Test the ApacheDVSNI challenge."""
|
||||||
@@ -32,7 +32,7 @@ class DvsniPerformTest(util.ApacheTest):
|
|||||||
rsa256_pem = pkg_resources.resource_string(
|
rsa256_pem = pkg_resources.resource_string(
|
||||||
"letsencrypt.client.tests", 'testdata/rsa256_key.pem')
|
"letsencrypt.client.tests", 'testdata/rsa256_key.pem')
|
||||||
|
|
||||||
auth_key = Key(rsa256_file, rsa256_pem)
|
auth_key = le_util.Key(rsa256_file, rsa256_pem)
|
||||||
self.challs = []
|
self.challs = []
|
||||||
self.challs.append(challenge_util.DvsniChall(
|
self.challs.append(challenge_util.DvsniChall(
|
||||||
"encryption-example.demo",
|
"encryption-example.demo",
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ from letsencrypt.client import client
|
|||||||
from letsencrypt.client import display
|
from letsencrypt.client import display
|
||||||
from letsencrypt.client import errors
|
from letsencrypt.client import errors
|
||||||
from letsencrypt.client import interfaces
|
from letsencrypt.client import interfaces
|
||||||
|
from letsencrypt.client import le_util
|
||||||
from letsencrypt.client import log
|
from letsencrypt.client import log
|
||||||
from letsencrypt.client.le_util import Key
|
|
||||||
|
|
||||||
|
|
||||||
def main(): # pylint: disable=too-many-statements,too-many-branches
|
def main(): # pylint: disable=too-many-statements,too-many-branches
|
||||||
@@ -119,7 +119,7 @@ def main(): # pylint: disable=too-many-statements,too-many-branches
|
|||||||
if args.privkey is None:
|
if args.privkey is None:
|
||||||
privkey = client.init_key(args.key_size)
|
privkey = client.init_key(args.key_size)
|
||||||
else:
|
else:
|
||||||
privkey = Key(args.privkey[0], args.privkey[1])
|
privkey = le_util.Key(args.privkey[0], args.privkey[1])
|
||||||
|
|
||||||
acme = client.Client(args.server, privkey, auth, installer)
|
acme = client.Client(args.server, privkey, auth, installer)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user