Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/certbot/certbot.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWinston Smith <Baeumla@users.noreply.github.com>2017-08-23 20:32:27 +0300
committerBrad Warren <bmw@users.noreply.github.com>2017-08-23 20:32:27 +0300
commit8ca36a0b629ff9e363df48e5b31320343574de7b (patch)
tree688ed26a4fb1a55388ebcf367ff286696b65415f
parentc33ee0e2df28b7bc5a8648468f2886a3d43ba5b9 (diff)
Organize + document `certbot/tests/testdata` directory (#4983)
* wp organize keys documentation start * oganized testdata directory + readme * clean up doc * del acme change
-rw-r--r--certbot/plugins/common_test.py4
-rw-r--r--certbot/tests/account_test.py8
-rw-r--r--certbot/tests/cert_manager_test.py2
-rw-r--r--certbot/tests/client_test.py14
-rw-r--r--certbot/tests/crypto_util_test.py49
-rw-r--r--certbot/tests/main_test.py18
-rw-r--r--certbot/tests/storage_test.py15
-rw-r--r--certbot/tests/testdata/README11
-rw-r--r--certbot/tests/testdata/cert-5sans_512.pem (renamed from certbot/tests/testdata/cert-5sans.pem)0
-rw-r--r--certbot/tests/testdata/cert-san_512.pem (renamed from certbot/tests/testdata/cert-san.pem)0
-rw-r--r--certbot/tests/testdata/cert.b64jose1
-rw-r--r--certbot/tests/testdata/cert.derbin377 -> 0 bytes
-rw-r--r--certbot/tests/testdata/cert_2048.pem (renamed from certbot/tests/testdata/self_signed_cert.pem)0
-rw-r--r--certbot/tests/testdata/cert_512.pem (renamed from certbot/tests/testdata/cert.pem)0
-rw-r--r--certbot/tests/testdata/cert_512_bad.pem (renamed from certbot/tests/testdata/self_signed_cert_bad.pem)0
-rw-r--r--certbot/tests/testdata/cert_fullchain_2048.pem (renamed from certbot/tests/testdata/self_signed_fullchain.pem)0
-rw-r--r--certbot/tests/testdata/csr-6sans.pem12
-rw-r--r--certbot/tests/testdata/csr-6sans_512.conf29
-rw-r--r--certbot/tests/testdata/csr-6sans_512.pem12
-rw-r--r--certbot/tests/testdata/csr-nonames_512.pem (renamed from certbot/tests/testdata/csr-nonames.pem)0
-rw-r--r--certbot/tests/testdata/csr-nosans.pem8
-rw-r--r--certbot/tests/testdata/csr-nosans_512.conf16
-rw-r--r--certbot/tests/testdata/csr-nosans_512.pem9
-rw-r--r--certbot/tests/testdata/csr-san_512.pem (renamed from certbot/tests/testdata/csr-san.pem)0
-rw-r--r--certbot/tests/testdata/csr_512.der (renamed from certbot/tests/testdata/csr.der)bin281 -> 281 bytes
-rw-r--r--certbot/tests/testdata/csr_512.pem (renamed from certbot/tests/testdata/csr.pem)0
-rw-r--r--certbot/tests/testdata/dsa512_key.pem14
-rw-r--r--certbot/tests/testdata/dsa_cert.pem17
-rw-r--r--certbot/tests/testdata/matching_cert.pem14
-rw-r--r--certbot/tests/testdata/rsa512_key_2.pem9
30 files changed, 134 insertions, 128 deletions
diff --git a/certbot/plugins/common_test.py b/certbot/plugins/common_test.py
index 411cbe651..409c05946 100644
--- a/certbot/plugins/common_test.py
+++ b/certbot/plugins/common_test.py
@@ -202,7 +202,7 @@ class TLSSNI01Test(unittest.TestCase):
achall.chall.encode.return_value = "token"
key = test_util.load_pyopenssl_private_key("rsa512_key.pem")
achall.response_and_validation.return_value = (
- response, (test_util.load_cert("cert.pem"), key))
+ response, (test_util.load_cert("cert_512.pem"), key))
with mock.patch("certbot.plugins.common.open",
mock_open, create=True):
@@ -215,7 +215,7 @@ class TLSSNI01Test(unittest.TestCase):
# pylint: disable=no-member
mock_open.assert_called_once_with(self.sni.get_cert_path(achall), "wb")
mock_open.return_value.write.assert_called_once_with(
- test_util.load_vector("cert.pem"))
+ test_util.load_vector("cert_512.pem"))
mock_safe_open.assert_called_once_with(
self.sni.get_key_path(achall), "wb", chmod=0o400)
mock_safe_open.return_value.write.assert_called_once_with(
diff --git a/certbot/tests/account_test.py b/certbot/tests/account_test.py
index 575a40286..7245ad6a1 100644
--- a/certbot/tests/account_test.py
+++ b/certbot/tests/account_test.py
@@ -17,7 +17,7 @@ from certbot import errors
import certbot.tests.util as test_util
-KEY = jose.JWKRSA.load(test_util.load_vector("rsa512_key_2.pem"))
+KEY = jose.JWKRSA.load(test_util.load_vector("rsa512_key.pem"))
class AccountTest(unittest.TestCase):
@@ -46,15 +46,15 @@ class AccountTest(unittest.TestCase):
def test_id(self):
self.assertEqual(
- self.acc.id, "bca5889f66457d5b62fbba7b25f9ab6f")
+ self.acc.id, "7adac10320f585ddf118429c0c4af2cd")
def test_slug(self):
self.assertEqual(
- self.acc.slug, "test.certbot.org@2015-07-04T14:04:10Z (bca5)")
+ self.acc.slug, "test.certbot.org@2015-07-04T14:04:10Z (7ada)")
def test_repr(self):
self.assertTrue(repr(self.acc).startswith(
- "<Account(i_am_a_regr, bca5889f66457d5b62fbba7b25f9ab6f, Meta("))
+ "<Account(i_am_a_regr, 7adac10320f585ddf118429c0c4af2cd, Meta("))
class ReportNewAccountTest(test_util.ConfigTestCase):
"""Tests for certbot.account.report_new_account."""
diff --git a/certbot/tests/cert_manager_test.py b/certbot/tests/cert_manager_test.py
index 401abcfbe..6c43eb168 100644
--- a/certbot/tests/cert_manager_test.py
+++ b/certbot/tests/cert_manager_test.py
@@ -426,7 +426,7 @@ class DuplicativeCertsTest(storage_test.BaseRenewableCertTest):
@mock.patch('certbot.util.make_or_verify_dir')
def test_find_duplicative_names(self, unused_makedir):
from certbot.cert_manager import find_duplicative_certs
- test_cert = test_util.load_vector('cert-san.pem')
+ test_cert = test_util.load_vector('cert-san_512.pem')
with open(self.test_rc.cert, 'wb') as f:
f.write(test_cert)
diff --git a/certbot/tests/client_test.py b/certbot/tests/client_test.py
index a547f6a9a..2416acf95 100644
--- a/certbot/tests/client_test.py
+++ b/certbot/tests/client_test.py
@@ -18,7 +18,7 @@ import certbot.tests.util as test_util
KEY = test_util.load_vector("rsa512_key.pem")
-CSR_SAN = test_util.load_vector("csr-san.pem")
+CSR_SAN = test_util.load_vector("csr-san_512.pem")
class RegisterTest(test_util.ConfigTestCase):
@@ -312,14 +312,14 @@ class ClientTest(ClientTestCommon):
@mock.patch("certbot.cli.helpful_parser")
def test_save_certificate(self, mock_parser):
# pylint: disable=too-many-locals
- certs = ["matching_cert.pem", "cert.pem", "cert-san.pem"]
+ certs = ["cert_512.pem", "cert-san_512.pem"]
tmp_path = tempfile.mkdtemp()
os.chmod(tmp_path, 0o755) # TODO: really??
certr = mock.MagicMock(body=test_util.load_comparable_cert(certs[0]))
- chain_cert = [test_util.load_comparable_cert(certs[1]),
- test_util.load_comparable_cert(certs[2])]
- candidate_cert_path = os.path.join(tmp_path, "certs", "cert.pem")
+ chain_cert = [test_util.load_comparable_cert(certs[0]),
+ test_util.load_comparable_cert(certs[1])]
+ candidate_cert_path = os.path.join(tmp_path, "certs", "cert_512.pem")
candidate_chain_path = os.path.join(tmp_path, "chains", "chain.pem")
candidate_fullchain_path = os.path.join(tmp_path, "chains", "fullchain.pem")
mock_parser.verb = "certonly"
@@ -344,8 +344,8 @@ class ClientTest(ClientTestCommon):
with open(chain_path, "rb") as chain_file:
chain_contents = chain_file.read()
- self.assertEqual(chain_contents, test_util.load_vector(certs[1]) +
- test_util.load_vector(certs[2]))
+ self.assertEqual(chain_contents, test_util.load_vector(certs[0]) +
+ test_util.load_vector(certs[1]))
shutil.rmtree(tmp_path)
diff --git a/certbot/tests/crypto_util_test.py b/certbot/tests/crypto_util_test.py
index bc41ca950..f0e2c017e 100644
--- a/certbot/tests/crypto_util_test.py
+++ b/certbot/tests/crypto_util_test.py
@@ -17,11 +17,10 @@ RSA256_KEY = test_util.load_vector('rsa256_key.pem')
RSA256_KEY_PATH = test_util.vector_path('rsa256_key.pem')
RSA512_KEY = test_util.load_vector('rsa512_key.pem')
RSA2048_KEY_PATH = test_util.vector_path('rsa2048_key.pem')
-CERT_PATH = test_util.vector_path('cert.pem')
-CERT = test_util.load_vector('cert.pem')
-SAN_CERT = test_util.load_vector('cert-san.pem')
-SS_CERT_PATH = test_util.vector_path('self_signed_cert.pem')
-SS_CERT = test_util.load_vector('self_signed_cert.pem')
+CERT_PATH = test_util.vector_path('cert_512.pem')
+CERT = test_util.load_vector('cert_512.pem')
+SS_CERT_PATH = test_util.vector_path('cert_2048.pem')
+SS_CERT = test_util.load_vector('cert_2048.pem')
class InitSaveKeyTest(test_util.TempDirTestCase):
"""Tests for certbot.crypto_util.init_save_key."""
@@ -88,13 +87,13 @@ class ValidCSRTest(unittest.TestCase):
return valid_csr(csr)
def test_valid_pem_true(self):
- self.assertTrue(self._call(test_util.load_vector('csr.pem')))
+ self.assertTrue(self._call(test_util.load_vector('csr_512.pem')))
def test_valid_pem_san_true(self):
- self.assertTrue(self._call(test_util.load_vector('csr-san.pem')))
+ self.assertTrue(self._call(test_util.load_vector('csr-san_512.pem')))
def test_valid_der_false(self):
- self.assertFalse(self._call(test_util.load_vector('csr.der')))
+ self.assertFalse(self._call(test_util.load_vector('csr_512.der')))
def test_empty_false(self):
self.assertFalse(self._call(''))
@@ -113,11 +112,11 @@ class CSRMatchesPubkeyTest(unittest.TestCase):
def test_valid_true(self):
self.assertTrue(self._call(
- test_util.load_vector('csr.pem'), RSA512_KEY))
+ test_util.load_vector('csr_512.pem'), RSA512_KEY))
def test_invalid_false(self):
self.assertFalse(self._call(
- test_util.load_vector('csr.pem'), RSA256_KEY))
+ test_util.load_vector('csr_512.pem'), RSA256_KEY))
class ImportCSRFileTest(unittest.TestCase):
@@ -129,9 +128,9 @@ class ImportCSRFileTest(unittest.TestCase):
return import_csr_file(*args, **kwargs)
def test_der_csr(self):
- csrfile = test_util.vector_path('csr.der')
- data = test_util.load_vector('csr.der')
- data_pem = test_util.load_vector('csr.pem')
+ csrfile = test_util.vector_path('csr_512.der')
+ data = test_util.load_vector('csr_512.der')
+ data_pem = test_util.load_vector('csr_512.pem')
self.assertEqual(
(OpenSSL.crypto.FILETYPE_PEM,
@@ -142,8 +141,8 @@ class ImportCSRFileTest(unittest.TestCase):
self._call(csrfile, data))
def test_pem_csr(self):
- csrfile = test_util.vector_path('csr.pem')
- data = test_util.load_vector('csr.pem')
+ csrfile = test_util.vector_path('csr_512.pem')
+ data = test_util.load_vector('csr_512.pem')
self.assertEqual(
(OpenSSL.crypto.FILETYPE_PEM,
@@ -155,8 +154,8 @@ class ImportCSRFileTest(unittest.TestCase):
def test_bad_csr(self):
self.assertRaises(errors.Error, self._call,
- test_util.vector_path('cert.pem'),
- test_util.load_vector('cert.pem'))
+ test_util.vector_path('cert_512.pem'),
+ test_util.load_vector('cert_512.pem'))
class MakeKeyTest(unittest.TestCase): # pylint: disable=too-few-public-methods
@@ -179,7 +178,7 @@ class VerifyCertSetup(unittest.TestCase):
self.renewable_cert.cert = SS_CERT_PATH
self.renewable_cert.chain = SS_CERT_PATH
self.renewable_cert.privkey = RSA2048_KEY_PATH
- self.renewable_cert.fullchain = test_util.vector_path('self_signed_fullchain.pem')
+ self.renewable_cert.fullchain = test_util.vector_path('cert_fullchain_2048.pem')
self.bad_renewable_cert = mock.MagicMock()
self.bad_renewable_cert.chain = SS_CERT_PATH
@@ -219,7 +218,7 @@ class VerifyRenewableCertSigTest(VerifyCertSetup):
self.assertEqual(None, self._call(self.renewable_cert))
def test_cert_sig_mismatch(self):
- self.bad_renewable_cert.cert = test_util.vector_path('self_signed_cert_bad.pem')
+ self.bad_renewable_cert.cert = test_util.vector_path('cert_512_bad.pem')
self.assertRaises(errors.Error, self._call, self.bad_renewable_cert)
@@ -275,7 +274,7 @@ class ValidPrivkeyTest(unittest.TestCase):
return valid_privkey(privkey)
def test_valid_true(self):
- self.assertTrue(self._call(RSA256_KEY))
+ self.assertTrue(self._call(RSA512_KEY))
def test_empty_false(self):
self.assertFalse(self._call(''))
@@ -293,12 +292,12 @@ class GetSANsFromCertTest(unittest.TestCase):
return get_sans_from_cert(*args, **kwargs)
def test_single(self):
- self.assertEqual([], self._call(test_util.load_vector('cert.pem')))
+ self.assertEqual([], self._call(test_util.load_vector('cert_512.pem')))
def test_san(self):
self.assertEqual(
['example.com', 'www.example.com'],
- self._call(test_util.load_vector('cert-san.pem')))
+ self._call(test_util.load_vector('cert-san_512.pem')))
class GetNamesFromCertTest(unittest.TestCase):
@@ -312,19 +311,19 @@ class GetNamesFromCertTest(unittest.TestCase):
def test_single(self):
self.assertEqual(
['example.com'],
- self._call(test_util.load_vector('cert.pem')))
+ self._call(test_util.load_vector('cert_512.pem')))
def test_san(self):
self.assertEqual(
['example.com', 'www.example.com'],
- self._call(test_util.load_vector('cert-san.pem')))
+ self._call(test_util.load_vector('cert-san_512.pem')))
def test_common_name_sans_order(self):
# Tests that the common name comes first
# followed by the SANS in alphabetical order
self.assertEqual(
['example.com'] + ['{0}.example.com'.format(c) for c in 'abcd'],
- self._call(test_util.load_vector('cert-5sans.pem')))
+ self._call(test_util.load_vector('cert-5sans_512.pem')))
def test_parse_non_cert(self):
self.assertRaises(OpenSSL.crypto.Error, self._call, "hello there")
diff --git a/certbot/tests/main_test.py b/certbot/tests/main_test.py
index ae34ebfd7..4abd344f2 100644
--- a/certbot/tests/main_test.py
+++ b/certbot/tests/main_test.py
@@ -30,13 +30,13 @@ from certbot.plugins import manual
import certbot.tests.util as test_util
-CERT_PATH = test_util.vector_path('cert.pem')
-CERT = test_util.vector_path('cert.pem')
-CSR = test_util.vector_path('csr.der')
+CERT_PATH = test_util.vector_path('cert_512.pem')
+CERT = test_util.vector_path('cert_512.pem')
+CSR = test_util.vector_path('csr_512.der')
KEY = test_util.vector_path('rsa256_key.pem')
-JWK = jose.JWKRSA.load(test_util.load_vector("rsa512_key_2.pem"))
+JWK = jose.JWKRSA.load(test_util.load_vector('rsa512_key.pem'))
RSA2048_KEY_PATH = test_util.vector_path('rsa2048_key.pem')
-SS_CERT_PATH = test_util.vector_path('self_signed_cert.pem')
+SS_CERT_PATH = test_util.vector_path('cert_2048.pem')
class TestHandleIdenticalCerts(unittest.TestCase):
@@ -225,7 +225,7 @@ class RevokeTest(test_util.TempDirTestCase):
shutil.copy(CERT_PATH, self.tempdir)
self.tmp_cert_path = os.path.abspath(os.path.join(self.tempdir,
- 'cert.pem'))
+ 'cert_512.pem'))
self.patches = [
mock.patch('acme.client.Client', autospec=True),
@@ -640,7 +640,7 @@ class MainTest(test_util.ConfigTestCase): # pylint: disable=too-many-public-met
self.assertRaises(
errors.Error, self._call,
'certonly --csr {0}'.format(
- test_util.vector_path('csr-nonames.pem')).split())
+ test_util.vector_path('csr-nonames_512.pem')).split())
def test_csr_with_inconsistent_domains(self):
self.assertRaises(
@@ -700,7 +700,7 @@ class MainTest(test_util.ConfigTestCase): # pylint: disable=too-many-public-met
def _test_renewal_common(self, due_for_renewal, extra_args, log_out=None,
args=None, should_renew=True, error_expected=False):
# pylint: disable=too-many-locals,too-many-arguments
- cert_path = test_util.vector_path('cert.pem')
+ cert_path = test_util.vector_path('cert_512.pem')
chain_path = '/etc/letsencrypt/live/foo.bar/fullchain.pem'
mock_lineage = mock.MagicMock(cert=cert_path, fullchain=chain_path,
cert_path=cert_path, fullchain_path=chain_path)
@@ -955,7 +955,7 @@ class MainTest(test_util.ConfigTestCase): # pylint: disable=too-many-public-met
chain = 'chain'
mock_client = mock.MagicMock()
mock_client.obtain_certificate_from_csr.return_value = (certr, chain)
- cert_path = '/etc/letsencrypt/live/example.com/cert.pem'
+ cert_path = '/etc/letsencrypt/live/example.com/cert_512.pem'
full_path = '/etc/letsencrypt/live/example.com/fullchain.pem'
mock_client.save_certificate.return_value = cert_path, None, full_path
with mock.patch('certbot.main._init_le_client') as mock_init:
diff --git a/certbot/tests/storage_test.py b/certbot/tests/storage_test.py
index 5e8acc832..48484098e 100644
--- a/certbot/tests/storage_test.py
+++ b/certbot/tests/storage_test.py
@@ -19,7 +19,8 @@ from certbot.storage import ALL_FOUR
import certbot.tests.util as test_util
-CERT = test_util.load_cert('cert.pem')
+CERT = test_util.load_cert('cert_512.pem')
+
def unlink_all(rc_object):
@@ -360,18 +361,21 @@ class RenewableCertTests(BaseRenewableCertTest):
def test_names(self):
# Trying the current version
- self._write_out_kind("cert", 12, test_util.load_vector("cert-san.pem"))
+ self._write_out_kind("cert", 12, test_util.load_vector("cert-san_512.pem"))
+
self.assertEqual(self.test_rc.names(),
["example.com", "www.example.com"])
# Trying a non-current version
- self._write_out_kind("cert", 15, test_util.load_vector("cert.pem"))
+ self._write_out_kind("cert", 15, test_util.load_vector("cert_512.pem"))
+
self.assertEqual(self.test_rc.names(12),
["example.com", "www.example.com"])
# Testing common name is listed first
self._write_out_kind(
- "cert", 12, test_util.load_vector("cert-5sans.pem"))
+ "cert", 12, test_util.load_vector("cert-5sans_512.pem"))
+
self.assertEqual(
self.test_rc.names(12),
["example.com"] + ["{0}.example.com".format(c) for c in "abcd"])
@@ -384,7 +388,8 @@ class RenewableCertTests(BaseRenewableCertTest):
def test_time_interval_judgments(self, mock_datetime):
"""Test should_autodeploy() and should_autorenew() on the basis
of expiry time windows."""
- test_cert = test_util.load_vector("cert.pem")
+ test_cert = test_util.load_vector("cert_512.pem")
+
self._write_out_ex_kinds()
self.test_rc.update_all_links_to(12)
diff --git a/certbot/tests/testdata/README b/certbot/tests/testdata/README
new file mode 100644
index 000000000..867215916
--- /dev/null
+++ b/certbot/tests/testdata/README
@@ -0,0 +1,11 @@
+The following command has been used to generate test keys:
+
+ for x in 256 512 2048; do openssl genrsa -out rsa${k}_key.pem $k; done
+
+and for the CSR PEM (Certificate Signing Request):
+
+ openssl req -new -out csr-Xsans_X.pem -key rsa512_key.pem [-config csr-Xsans_X.conf | -subj '/CN=example.com'] [-outform DER > csr_X.der]
+
+and for the certificate:
+
+ openssl req -new -out cert_X.pem -key rsaX_key.pem -subj '/CN=example.com' -x509 [-outform DER > cert_X.der] \ No newline at end of file
diff --git a/certbot/tests/testdata/cert-5sans.pem b/certbot/tests/testdata/cert-5sans_512.pem
index 5de7cc6cb..5de7cc6cb 100644
--- a/certbot/tests/testdata/cert-5sans.pem
+++ b/certbot/tests/testdata/cert-5sans_512.pem
diff --git a/certbot/tests/testdata/cert-san.pem b/certbot/tests/testdata/cert-san_512.pem
index dcb835994..dcb835994 100644
--- a/certbot/tests/testdata/cert-san.pem
+++ b/certbot/tests/testdata/cert-san_512.pem
diff --git a/certbot/tests/testdata/cert.b64jose b/certbot/tests/testdata/cert.b64jose
deleted file mode 100644
index fa1abdb9f..000000000
--- a/certbot/tests/testdata/cert.b64jose
+++ /dev/null
@@ -1 +0,0 @@
-MIIB3jCCAYigAwIBAgICBTkwDQYJKoZIhvcNAQELBQAwdzELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE1pY2hpZ2FuMRIwEAYDVQQHDAlBbm4gQXJib3IxKzApBgNVBAoMIlVuaXZlcnNpdHkgb2YgTWljaGlnYW4gYW5kIHRoZSBFRkYxFDASBgNVBAMMC2V4YW1wbGUuY29tMB4XDTE0MTIxMTIyMzQ0NVoXDTE0MTIxODIyMzQ0NVowdzELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE1pY2hpZ2FuMRIwEAYDVQQHDAlBbm4gQXJib3IxKzApBgNVBAoMIlVuaXZlcnNpdHkgb2YgTWljaGlnYW4gYW5kIHRoZSBFRkYxFDASBgNVBAMMC2V4YW1wbGUuY29tMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKx1c7RR7R_drnBSQ_zfx1vQLHUbFLh1AQQQ5R8DZUXd36efNK79vukFhN9HFoHZiUvOjm0c-pVE6K-EdE_twuUCAwEAATANBgkqhkiG9w0BAQsFAANBAC24z0IdwIVKSlntksllvr6zJepBH5fMndfk3XJp10jT6VE-14KNtjh02a56GoraAvJAT5_H67E8GvJ_ocNnB_o \ No newline at end of file
diff --git a/certbot/tests/testdata/cert.der b/certbot/tests/testdata/cert.der
deleted file mode 100644
index 5f1018505..000000000
--- a/certbot/tests/testdata/cert.der
+++ /dev/null
Binary files differ
diff --git a/certbot/tests/testdata/self_signed_cert.pem b/certbot/tests/testdata/cert_2048.pem
index e02f18e91..e02f18e91 100644
--- a/certbot/tests/testdata/self_signed_cert.pem
+++ b/certbot/tests/testdata/cert_2048.pem
diff --git a/certbot/tests/testdata/cert.pem b/certbot/tests/testdata/cert_512.pem
index 96c55cbf4..96c55cbf4 100644
--- a/certbot/tests/testdata/cert.pem
+++ b/certbot/tests/testdata/cert_512.pem
diff --git a/certbot/tests/testdata/self_signed_cert_bad.pem b/certbot/tests/testdata/cert_512_bad.pem
index d868dc445..d868dc445 100644
--- a/certbot/tests/testdata/self_signed_cert_bad.pem
+++ b/certbot/tests/testdata/cert_512_bad.pem
diff --git a/certbot/tests/testdata/self_signed_fullchain.pem b/certbot/tests/testdata/cert_fullchain_2048.pem
index 422d221fb..422d221fb 100644
--- a/certbot/tests/testdata/self_signed_fullchain.pem
+++ b/certbot/tests/testdata/cert_fullchain_2048.pem
diff --git a/certbot/tests/testdata/csr-6sans.pem b/certbot/tests/testdata/csr-6sans.pem
deleted file mode 100644
index 8f6b52bd7..000000000
--- a/certbot/tests/testdata/csr-6sans.pem
+++ /dev/null
@@ -1,12 +0,0 @@
------BEGIN CERTIFICATE REQUEST-----
-MIIBuzCCAWUCAQAweTELMAkGA1UEBhMCVVMxETAPBgNVBAgTCE1pY2hpZ2FuMRIw
-EAYDVQQHEwlBbm4gQXJib3IxDDAKBgNVBAoTA0VGRjEfMB0GA1UECxMWVW5pdmVy
-c2l0eSBvZiBNaWNoaWdhbjEUMBIGA1UEAxMLZXhhbXBsZS5jb20wXDANBgkqhkiG
-9w0BAQEFAANLADBIAkEA9LYRcVE3Nr+qleecEcX8JwVDnjeG1X7ucsCasuuZM0e0
-9cmYuUzxIkMjO/9x4AVcvXXRXPEV+LzWWkfkTlzRMwIDAQABoIGGMIGDBgkqhkiG
-9w0BCQ4xdjB0MHIGA1UdEQRrMGmCC2V4YW1wbGUuY29tggtleGFtcGxlLm9yZ4IL
-ZXhhbXBsZS5uZXSCDGV4YW1wbGUuaW5mb4IVc3ViZG9tYWluLmV4YW1wbGUuY29t
-ghtvdGhlci5zdWJkb21haW4uZXhhbXBsZS5jb20wDQYJKoZIhvcNAQELBQADQQBd
-k4BE5qvEvkYoZM/2++Xd9RrQ6wsdj0QiJQCozfsI4lQx6ZJnbtNc7HpDrX4W6XIv
-IvzVBz/nD11drfz/RNuX
------END CERTIFICATE REQUEST-----
diff --git a/certbot/tests/testdata/csr-6sans_512.conf b/certbot/tests/testdata/csr-6sans_512.conf
new file mode 100644
index 000000000..fa7b3edc2
--- /dev/null
+++ b/certbot/tests/testdata/csr-6sans_512.conf
@@ -0,0 +1,29 @@
+[req]
+distinguished_name = req_distinguished_name
+req_extensions = v3_req
+
+[req_distinguished_name]
+C=US
+C_default = US
+ST=Michigan
+ST_default=Michigan
+L=Ann Arbor
+L_default=Ann Arbor
+O=EFF
+O_default=EFF
+OU=University of Michigan
+OU_default=University of Michigan
+CN=example.com
+CN_default=example.com
+
+
+[ v3_req ]
+subjectAltName = @alt_names
+
+[alt_names]
+DNS.1 = example.com
+DNS.2 = example.org
+DNS.3 = example.net
+DNS.4 = example.info
+DNS.5 = subdomain.example.com
+DNS.6 = other.subdomain.example.com \ No newline at end of file
diff --git a/certbot/tests/testdata/csr-6sans_512.pem b/certbot/tests/testdata/csr-6sans_512.pem
new file mode 100644
index 000000000..f72c0541d
--- /dev/null
+++ b/certbot/tests/testdata/csr-6sans_512.pem
@@ -0,0 +1,12 @@
+-----BEGIN CERTIFICATE REQUEST-----
+MIIBuzCCAWUCAQAweTELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE1pY2hpZ2FuMRIw
+EAYDVQQHDAlBbm4gQXJib3IxDDAKBgNVBAoMA0VGRjEfMB0GA1UECwwWVW5pdmVy
+c2l0eSBvZiBNaWNoaWdhbjEUMBIGA1UEAwwLZXhhbXBsZS5jb20wXDANBgkqhkiG
+9w0BAQEFAANLADBIAkEArHVztFHtH92ucFJD/N/HW9AsdRsUuHUBBBDlHwNlRd3f
+p580rv2+6QWE30cWgdmJS86ObRz6lUTor4R0T+3C5QIDAQABoIGGMIGDBgkqhkiG
+9w0BCQ4xdjB0MHIGA1UdEQRrMGmCC2V4YW1wbGUuY29tggtleGFtcGxlLm9yZ4IL
+ZXhhbXBsZS5uZXSCDGV4YW1wbGUuaW5mb4IVc3ViZG9tYWluLmV4YW1wbGUuY29t
+ghtvdGhlci5zdWJkb21haW4uZXhhbXBsZS5jb20wDQYJKoZIhvcNAQELBQADQQA+
+sU6T30n3SsdnHlj0Va8eECOWK7Lf8nUfxxgjPMQ7BoU8gbAnGfDmOlwDronTRqf1
+Me+nlYJU4TX1OiX10DYu
+-----END CERTIFICATE REQUEST-----
diff --git a/certbot/tests/testdata/csr-nonames.pem b/certbot/tests/testdata/csr-nonames_512.pem
index abe1029ca..abe1029ca 100644
--- a/certbot/tests/testdata/csr-nonames.pem
+++ b/certbot/tests/testdata/csr-nonames_512.pem
diff --git a/certbot/tests/testdata/csr-nosans.pem b/certbot/tests/testdata/csr-nosans.pem
deleted file mode 100644
index 813db67b0..000000000
--- a/certbot/tests/testdata/csr-nosans.pem
+++ /dev/null
@@ -1,8 +0,0 @@
------BEGIN CERTIFICATE REQUEST-----
-MIIBFTCBwAIBADBbMQswCQYDVQQGEwJBVTETMBEGA1UECAwKU29tZS1TdGF0ZTEh
-MB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMRQwEgYDVQQDDAtleGFt
-cGxlLm9yZzBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQD0thFxUTc2v6qV55wRxfwn
-BUOeN4bVfu5ywJqy65kzR7T1yZi5TPEiQyM7/3HgBVy9ddFc8RX4vNZaR+ROXNEz
-AgMBAAGgADANBgkqhkiG9w0BAQsFAANBAMikGL8Ch7hQCStXH7chhDp6+pt2+VSo
-wgsrPQ2Bw4veDMlSemUrH+4e0TwbbntHfvXTDHWs9P3BiIDJLxFrjuA=
------END CERTIFICATE REQUEST-----
diff --git a/certbot/tests/testdata/csr-nosans_512.conf b/certbot/tests/testdata/csr-nosans_512.conf
new file mode 100644
index 000000000..1026cf9ad
--- /dev/null
+++ b/certbot/tests/testdata/csr-nosans_512.conf
@@ -0,0 +1,16 @@
+[req]
+distinguished_name = req_distinguished_name
+
+[req_distinguished_name]
+C=US
+C_default = US
+ST=Michigan
+ST_default=Michigan
+L=Ann Arbor
+L_default=Ann Arbor
+O=EFF
+O_default=EFF
+OU=University of Michigan
+OU_default=University of Michigan
+CN=example.com
+CN_default=example.com \ No newline at end of file
diff --git a/certbot/tests/testdata/csr-nosans_512.pem b/certbot/tests/testdata/csr-nosans_512.pem
new file mode 100644
index 000000000..5f02d7e97
--- /dev/null
+++ b/certbot/tests/testdata/csr-nosans_512.pem
@@ -0,0 +1,9 @@
+-----BEGIN CERTIFICATE REQUEST-----
+MIIBMzCB3gIBADB5MQswCQYDVQQGEwJVUzERMA8GA1UECAwITWljaGlnYW4xEjAQ
+BgNVBAcMCUFubiBBcmJvcjEMMAoGA1UECgwDRUZGMR8wHQYDVQQLDBZVbml2ZXJz
+aXR5IHBmIE1pY2hpZ2FuMRQwEgYDVQQDDAtleGFtcGxlLmNvbTBcMA0GCSqGSIb3
+DQEBAQUAA0sAMEgCQQCsdXO0Ue0f3a5wUkP838db0Cx1GxS4dQEEEOUfA2VF3d+n
+nzSu/b7pBYTfRxaB2YlLzo5tHPqVROivhHRP7cLlAgMBAAGgADANBgkqhkiG9w0B
+AQsFAANBAG06jIPvSC6wiGLy7sUTaEX4UCE6Cztp3vh/uXN7Q++CGn6KiXNs/BRW
+eFlcFPbvxbVG/ZZFR5aPs+Oy6RhqOjg=
+-----END CERTIFICATE REQUEST-----
diff --git a/certbot/tests/testdata/csr-san.pem b/certbot/tests/testdata/csr-san_512.pem
index a7128e35c..a7128e35c 100644
--- a/certbot/tests/testdata/csr-san.pem
+++ b/certbot/tests/testdata/csr-san_512.pem
diff --git a/certbot/tests/testdata/csr.der b/certbot/tests/testdata/csr_512.der
index 5c03f3a11..5c03f3a11 100644
--- a/certbot/tests/testdata/csr.der
+++ b/certbot/tests/testdata/csr_512.der
Binary files differ
diff --git a/certbot/tests/testdata/csr.pem b/certbot/tests/testdata/csr_512.pem
index c62224ca7..c62224ca7 100644
--- a/certbot/tests/testdata/csr.pem
+++ b/certbot/tests/testdata/csr_512.pem
diff --git a/certbot/tests/testdata/dsa512_key.pem b/certbot/tests/testdata/dsa512_key.pem
deleted file mode 100644
index 78e164712..000000000
--- a/certbot/tests/testdata/dsa512_key.pem
+++ /dev/null
@@ -1,14 +0,0 @@
------BEGIN DSA PARAMETERS-----
-MIGdAkEAwebEoGBfokKQeALHHnAZMQwYU35ILEBdV8oUmzv7qpSVUoHihyqfn6GC
-OixAKSP8EJYcTilIqPbFbfFyOPlbLwIVANoFHEDiQgknAvKrG78pHzAJdQSPAkEA
-qfka5Bnl+CeEMpzVZGrOVqZE/LFdZK9eT6YtWjzqtIkf3hwXUVxJsTnBG4xmrfvl
-41pgNJpgu99YOYqPpS0g7A==
------END DSA PARAMETERS-----
------BEGIN DSA PRIVATE KEY-----
-MIH5AgEAAkEAwebEoGBfokKQeALHHnAZMQwYU35ILEBdV8oUmzv7qpSVUoHihyqf
-n6GCOixAKSP8EJYcTilIqPbFbfFyOPlbLwIVANoFHEDiQgknAvKrG78pHzAJdQSP
-AkEAqfka5Bnl+CeEMpzVZGrOVqZE/LFdZK9eT6YtWjzqtIkf3hwXUVxJsTnBG4xm
-rfvl41pgNJpgu99YOYqPpS0g7AJATQ2LUzjGQSM6UljcPY5I2OD9THkUR9kH2tth
-zZd70UoI9btrVaTizgqYShuok94glSQNK0H92JgUk3scJPaAkAIVAMDn61h6vrCE
-mNv063So6E+eYaIN
------END DSA PRIVATE KEY-----
diff --git a/certbot/tests/testdata/dsa_cert.pem b/certbot/tests/testdata/dsa_cert.pem
deleted file mode 100644
index ef94536e7..000000000
--- a/certbot/tests/testdata/dsa_cert.pem
+++ /dev/null
@@ -1,17 +0,0 @@
------BEGIN CERTIFICATE-----
-MIICuDCCAnWgAwIBAgIJAPjmErVMzwVLMAsGCWCGSAFlAwQDAjB3MQswCQYDVQQG
-EwJVUzERMA8GA1UECAwITWljaGlnYW4xEjAQBgNVBAcMCUFubiBBcmJvcjErMCkG
-A1UECgwiVW5pdmVyc2l0eSBvZiBNaWNoaWdhbiBhbmQgdGhlIEVGRjEUMBIGA1UE
-AwwLZXhhbXBsZS5jb20wHhcNMTUwNTEyMTUzOTQzWhcNMTUwNjExMTUzOTQzWjB3
-MQswCQYDVQQGEwJVUzERMA8GA1UECAwITWljaGlnYW4xEjAQBgNVBAcMCUFubiBB
-cmJvcjErMCkGA1UECgwiVW5pdmVyc2l0eSBvZiBNaWNoaWdhbiBhbmQgdGhlIEVG
-RjEUMBIGA1UEAwwLZXhhbXBsZS5jb20wgfEwgakGByqGSM44BAEwgZ0CQQDB5sSg
-YF+iQpB4AscecBkxDBhTfkgsQF1XyhSbO/uqlJVSgeKHKp+foYI6LEApI/wQlhxO
-KUio9sVt8XI4+VsvAhUA2gUcQOJCCScC8qsbvykfMAl1BI8CQQCp+RrkGeX4J4Qy
-nNVkas5WpkT8sV1kr15Ppi1aPOq0iR/eHBdRXEmxOcEbjGat++XjWmA0mmC731g5
-io+lLSDsA0MAAkBNDYtTOMZBIzpSWNw9jkjY4P1MeRRH2Qfa22HNl3vRSgj1u2tV
-pOLOCphKG6iT3iCVJA0rQf3YmBSTexwk9oCQo1AwTjAdBgNVHQ4EFgQUZ2DlTDGU
-PMwTUt0KztM6IyX61BcwHwYDVR0jBBgwFoAUZ2DlTDGUPMwTUt0KztM6IyX61Bcw
-DAYDVR0TBAUwAwEB/zALBglghkgBZQMEAwIDMAAwLQIVAIbMgGx+KwBr4rgqZ2Lh
-AAO8TegHAhQsuxpIIIphiReoWEtEJk4TqEIz/A==
------END CERTIFICATE-----
diff --git a/certbot/tests/testdata/matching_cert.pem b/certbot/tests/testdata/matching_cert.pem
deleted file mode 100644
index fda9cb1f4..000000000
--- a/certbot/tests/testdata/matching_cert.pem
+++ /dev/null
@@ -1,14 +0,0 @@
------BEGIN CERTIFICATE-----
-MIICNzCCAeGgAwIBAgIJALizm9Y3q620MA0GCSqGSIb3DQEBCwUAMHcxCzAJBgNV
-BAYTAlVTMREwDwYDVQQIDAhNaWNoaWdhbjESMBAGA1UEBwwJQW5uIEFyYm9yMSsw
-KQYDVQQKDCJVbml2ZXJzaXR5IG9mIE1pY2hpZ2FuIGFuZCB0aGUgRUZGMRQwEgYD
-VQQDDAtleGFtcGxlLmNvbTAeFw0xNTA1MDkwMDI0NTJaFw0xNjA1MDgwMDI0NTJa
-MHcxCzAJBgNVBAYTAlVTMREwDwYDVQQIDAhNaWNoaWdhbjESMBAGA1UEBwwJQW5u
-IEFyYm9yMSswKQYDVQQKDCJVbml2ZXJzaXR5IG9mIE1pY2hpZ2FuIGFuZCB0aGUg
-RUZGMRQwEgYDVQQDDAtleGFtcGxlLmNvbTBcMA0GCSqGSIb3DQEBAQUAA0sAMEgC
-QQD0thFxUTc2v6qV55wRxfwnBUOeN4bVfu5ywJqy65kzR7T1yZi5TPEiQyM7/3Hg
-BVy9ddFc8RX4vNZaR+ROXNEzAgMBAAGjUDBOMB0GA1UdDgQWBBRJieHEVSHKmBk0
-mTExx1erzlylCjAfBgNVHSMEGDAWgBRJieHEVSHKmBk0mTExx1erzlylCjAMBgNV
-HRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA0EABT/nlpqOaanFSLZmWIrKv0zt63k4
-bmWNMA8fYT45KYpLomsW8qXdpC82IlVKfNk7fW0UYT3HOeDSJRcycxNCTQ==
------END CERTIFICATE-----
diff --git a/certbot/tests/testdata/rsa512_key_2.pem b/certbot/tests/testdata/rsa512_key_2.pem
deleted file mode 100644
index 709b6d8e3..000000000
--- a/certbot/tests/testdata/rsa512_key_2.pem
+++ /dev/null
@@ -1,9 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIBOwIBAAJBAPS2EXFRNza/qpXnnBHF/CcFQ543htV+7nLAmrLrmTNHtPXJmLlM
-8SJDIzv/ceAFXL110VzxFfi81lpH5E5c0TMCAwEAAQJBALmppYQ/JVARjWBcsEm/
-1/bXBJ127YLv4gQIY5baL4r6IdEE33OXMTTmD9wf+ajuq1eaH0htHkwhOvREu0sz
-bskCIQD/Cg+xhEVLcwK3pFp3afPIhj1IPFiL3Uy/nqyMZ6O/RQIhAPWiDBofp7Cp
-J4dGZs+hkRySq/IOeeRJlNK1Pq64nToXAiBZ7+te1100YSd5KT051SRB94zO13EG
-SZESFduVW8rz3QIgK+tLiqg6TYYRQUi/PUTAM4GuKNuZw828RGiPyqHLywUCIQCd
-pkZrNphL/y0D7HSbPIfZzD90M2V8tUjlK0BTqk1bHA==
------END RSA PRIVATE KEY-----