mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 18:56:55 +02:00
Sort vectors: acme/testdata, separate acme and letsencrypt.
This commit is contained in:
+1
-1
@@ -6,7 +6,7 @@ include letsencrypt/EULA
|
|||||||
recursive-include letsencrypt/tests/testdata *
|
recursive-include letsencrypt/tests/testdata *
|
||||||
|
|
||||||
recursive-include acme/schemata *.json
|
recursive-include acme/schemata *.json
|
||||||
recursive-include acme/jose/testdata *
|
recursive-include acme/testdata *
|
||||||
|
|
||||||
recursive-include letsencrypt_apache/tests/testdata *
|
recursive-include letsencrypt_apache/tests/testdata *
|
||||||
include letsencrypt_apache/options-ssl-apache.conf
|
include letsencrypt_apache/options-ssl-apache.conf
|
||||||
|
|||||||
@@ -16,10 +16,10 @@ from acme import other
|
|||||||
|
|
||||||
CERT = jose.ComparableX509(OpenSSL.crypto.load_certificate(
|
CERT = jose.ComparableX509(OpenSSL.crypto.load_certificate(
|
||||||
OpenSSL.crypto.FILETYPE_PEM, pkg_resources.resource_string(
|
OpenSSL.crypto.FILETYPE_PEM, pkg_resources.resource_string(
|
||||||
'letsencrypt.tests', os.path.join('testdata', 'cert.pem'))))
|
'acme', os.path.join('testdata', 'cert.pem'))))
|
||||||
KEY = serialization.load_pem_private_key(
|
KEY = serialization.load_pem_private_key(
|
||||||
pkg_resources.resource_string(
|
pkg_resources.resource_string(
|
||||||
'acme.jose', os.path.join('testdata', 'rsa512_key.pem')),
|
'acme', os.path.join('testdata', 'rsa512_key.pem')),
|
||||||
password=None, backend=default_backend())
|
password=None, backend=default_backend())
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -18,11 +18,11 @@ from acme import messages_test
|
|||||||
|
|
||||||
|
|
||||||
CERT_DER = pkg_resources.resource_string(
|
CERT_DER = pkg_resources.resource_string(
|
||||||
'acme.jose', os.path.join('testdata', 'cert.der'))
|
'acme', os.path.join('testdata', 'cert.der'))
|
||||||
KEY = jose.JWKRSA.load(pkg_resources.resource_string(
|
KEY = jose.JWKRSA.load(pkg_resources.resource_string(
|
||||||
'acme.jose', os.path.join('testdata', 'rsa512_key.pem')))
|
'acme', os.path.join('testdata', 'rsa512_key.pem')))
|
||||||
KEY2 = jose.JWKRSA.load(pkg_resources.resource_string(
|
KEY2 = jose.JWKRSA.load(pkg_resources.resource_string(
|
||||||
'acme.jose', os.path.join('testdata', 'rsa256_key.pem')))
|
'acme', os.path.join('testdata', 'rsa256_key.pem')))
|
||||||
|
|
||||||
|
|
||||||
class ClientTest(unittest.TestCase):
|
class ClientTest(unittest.TestCase):
|
||||||
|
|||||||
@@ -14,10 +14,10 @@ from acme.jose import util
|
|||||||
|
|
||||||
CERT = util.ComparableX509(OpenSSL.crypto.load_certificate(
|
CERT = util.ComparableX509(OpenSSL.crypto.load_certificate(
|
||||||
OpenSSL.crypto.FILETYPE_PEM, pkg_resources.resource_string(
|
OpenSSL.crypto.FILETYPE_PEM, pkg_resources.resource_string(
|
||||||
'letsencrypt.tests', os.path.join('testdata', 'cert.pem'))))
|
'acme', os.path.join('testdata', 'cert.pem'))))
|
||||||
CSR = util.ComparableX509(OpenSSL.crypto.load_certificate_request(
|
CSR = util.ComparableX509(OpenSSL.crypto.load_certificate_request(
|
||||||
OpenSSL.crypto.FILETYPE_PEM, pkg_resources.resource_string(
|
OpenSSL.crypto.FILETYPE_PEM, pkg_resources.resource_string(
|
||||||
'letsencrypt.tests', os.path.join('testdata', 'csr.pem'))))
|
'acme', os.path.join('testdata', 'csr.pem'))))
|
||||||
|
|
||||||
|
|
||||||
class FieldTest(unittest.TestCase):
|
class FieldTest(unittest.TestCase):
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ from acme.jose import jwk_test
|
|||||||
|
|
||||||
RSA1024_KEY = serialization.load_pem_private_key(
|
RSA1024_KEY = serialization.load_pem_private_key(
|
||||||
pkg_resources.resource_string(
|
pkg_resources.resource_string(
|
||||||
__name__, os.path.join('testdata', 'rsa1024_key.pem')),
|
'acme', os.path.join('testdata', 'rsa1024_key.pem')),
|
||||||
password=None, backend=default_backend())
|
password=None, backend=default_backend())
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -11,14 +11,14 @@ from acme.jose import util
|
|||||||
|
|
||||||
|
|
||||||
DSA_PEM = pkg_resources.resource_string(
|
DSA_PEM = pkg_resources.resource_string(
|
||||||
'letsencrypt.tests', os.path.join('testdata', 'dsa512_key.pem'))
|
'acme', os.path.join('testdata', 'dsa512_key.pem'))
|
||||||
RSA256_KEY = serialization.load_pem_private_key(
|
RSA256_KEY = serialization.load_pem_private_key(
|
||||||
pkg_resources.resource_string(
|
pkg_resources.resource_string(
|
||||||
__name__, os.path.join('testdata', 'rsa256_key.pem')),
|
'acme', os.path.join('testdata', 'rsa256_key.pem')),
|
||||||
password=None, backend=default_backend())
|
password=None, backend=default_backend())
|
||||||
RSA512_KEY = serialization.load_pem_private_key(
|
RSA512_KEY = serialization.load_pem_private_key(
|
||||||
pkg_resources.resource_string(
|
pkg_resources.resource_string(
|
||||||
__name__, os.path.join('testdata', 'rsa512_key.pem')),
|
'acme', os.path.join('testdata', 'rsa512_key.pem')),
|
||||||
password=None, backend=default_backend())
|
password=None, backend=default_backend())
|
||||||
|
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@ class JWKRSATest(unittest.TestCase):
|
|||||||
from acme.jose.jwk import JWKRSA
|
from acme.jose.jwk import JWKRSA
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
self.private, JWKRSA.load(pkg_resources.resource_string(
|
self.private, JWKRSA.load(pkg_resources.resource_string(
|
||||||
__name__, os.path.join('testdata', 'rsa256_key.pem'))))
|
'acme', os.path.join('testdata', 'rsa256_key.pem'))))
|
||||||
|
|
||||||
def test_public_key(self):
|
def test_public_key(self):
|
||||||
self.assertEqual(self.jwk256, self.private.public_key())
|
self.assertEqual(self.jwk256, self.private.public_key())
|
||||||
|
|||||||
@@ -18,10 +18,10 @@ from acme.jose import util
|
|||||||
|
|
||||||
CERT = util.ComparableX509(OpenSSL.crypto.load_certificate(
|
CERT = util.ComparableX509(OpenSSL.crypto.load_certificate(
|
||||||
OpenSSL.crypto.FILETYPE_PEM, pkg_resources.resource_string(
|
OpenSSL.crypto.FILETYPE_PEM, pkg_resources.resource_string(
|
||||||
'letsencrypt.tests', 'testdata/cert.pem')))
|
'acme', 'testdata/cert.pem')))
|
||||||
RSA512_KEY = serialization.load_pem_private_key(
|
RSA512_KEY = serialization.load_pem_private_key(
|
||||||
pkg_resources.resource_string(
|
pkg_resources.resource_string(
|
||||||
__name__, os.path.join('testdata', 'rsa512_key.pem')),
|
'acme', os.path.join('testdata', 'rsa512_key.pem')),
|
||||||
password=None, backend=default_backend())
|
password=None, backend=default_backend())
|
||||||
|
|
||||||
|
|
||||||
@@ -210,7 +210,7 @@ class CLITest(unittest.TestCase):
|
|||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.key_path = pkg_resources.resource_filename(
|
self.key_path = pkg_resources.resource_filename(
|
||||||
__name__, os.path.join('testdata', 'rsa512_key.pem'))
|
'acme', os.path.join('testdata', 'rsa512_key.pem'))
|
||||||
|
|
||||||
def test_unverified(self):
|
def test_unverified(self):
|
||||||
from acme.jose.jws import CLI
|
from acme.jose.jws import CLI
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class ComparableX509Test(unittest.TestCase):
|
|||||||
def _load(method, filename): # pylint: disable=missing-docstring
|
def _load(method, filename): # pylint: disable=missing-docstring
|
||||||
return ComparableX509(method(
|
return ComparableX509(method(
|
||||||
OpenSSL.crypto.FILETYPE_PEM, pkg_resources.resource_string(
|
OpenSSL.crypto.FILETYPE_PEM, pkg_resources.resource_string(
|
||||||
'letsencrypt.tests', os.path.join('testdata', filename))))
|
'acme', os.path.join('testdata', filename))))
|
||||||
|
|
||||||
self.req1 = _load(OpenSSL.crypto.load_certificate_request, 'csr.pem')
|
self.req1 = _load(OpenSSL.crypto.load_certificate_request, 'csr.pem')
|
||||||
self.req2 = _load(OpenSSL.crypto.load_certificate_request, 'csr.pem')
|
self.req2 = _load(OpenSSL.crypto.load_certificate_request, 'csr.pem')
|
||||||
@@ -61,13 +61,13 @@ class ComparableRSAKeyTest(unittest.TestCase):
|
|||||||
def load_key(): # pylint: disable=missing-docstring
|
def load_key(): # pylint: disable=missing-docstring
|
||||||
return ComparableRSAKey(serialization.load_pem_private_key(
|
return ComparableRSAKey(serialization.load_pem_private_key(
|
||||||
pkg_resources.resource_string(
|
pkg_resources.resource_string(
|
||||||
__name__, os.path.join('testdata', 'rsa256_key.pem')),
|
'acme', os.path.join('testdata', 'rsa256_key.pem')),
|
||||||
password=None, backend=backend))
|
password=None, backend=backend))
|
||||||
self.key = load_key()
|
self.key = load_key()
|
||||||
self.key_same = load_key()
|
self.key_same = load_key()
|
||||||
self.key2 = ComparableRSAKey(serialization.load_pem_private_key(
|
self.key2 = ComparableRSAKey(serialization.load_pem_private_key(
|
||||||
pkg_resources.resource_string(
|
pkg_resources.resource_string(
|
||||||
__name__, os.path.join('testdata', 'rsa512_key.pem')),
|
'acme', os.path.join('testdata', 'rsa512_key.pem')),
|
||||||
password=None, backend=backend))
|
password=None, backend=backend))
|
||||||
|
|
||||||
def test_getattr_proxy(self):
|
def test_getattr_proxy(self):
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ from acme import jose
|
|||||||
|
|
||||||
RSA512_KEY = serialization.load_pem_private_key(
|
RSA512_KEY = serialization.load_pem_private_key(
|
||||||
pkg_resources.resource_string(
|
pkg_resources.resource_string(
|
||||||
'acme.jose', os.path.join('testdata', 'rsa512_key.pem')),
|
'acme', os.path.join('testdata', 'rsa512_key.pem')),
|
||||||
password=None, backend=default_backend())
|
password=None, backend=default_backend())
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -14,17 +14,17 @@ from acme import jose
|
|||||||
|
|
||||||
CERT = jose.ComparableX509(OpenSSL.crypto.load_certificate(
|
CERT = jose.ComparableX509(OpenSSL.crypto.load_certificate(
|
||||||
OpenSSL.crypto.FILETYPE_ASN1, pkg_resources.resource_string(
|
OpenSSL.crypto.FILETYPE_ASN1, pkg_resources.resource_string(
|
||||||
'acme.jose', os.path.join('testdata', 'cert.der'))))
|
'acme', os.path.join('testdata', 'cert.der'))))
|
||||||
CSR = jose.ComparableX509(OpenSSL.crypto.load_certificate_request(
|
CSR = jose.ComparableX509(OpenSSL.crypto.load_certificate_request(
|
||||||
OpenSSL.crypto.FILETYPE_ASN1, pkg_resources.resource_string(
|
OpenSSL.crypto.FILETYPE_ASN1, pkg_resources.resource_string(
|
||||||
'acme.jose', os.path.join('testdata', 'csr.der'))))
|
'acme', os.path.join('testdata', 'csr.der'))))
|
||||||
KEY = serialization.load_pem_private_key(
|
KEY = serialization.load_pem_private_key(
|
||||||
pkg_resources.resource_string(
|
pkg_resources.resource_string(
|
||||||
'acme.jose', os.path.join('testdata', 'rsa512_key.pem')),
|
'acme', os.path.join('testdata', 'rsa512_key.pem')),
|
||||||
password=None, backend=default_backend())
|
password=None, backend=default_backend())
|
||||||
CERT = jose.ComparableX509(OpenSSL.crypto.load_certificate(
|
CERT = jose.ComparableX509(OpenSSL.crypto.load_certificate(
|
||||||
OpenSSL.crypto.FILETYPE_ASN1, pkg_resources.resource_string(
|
OpenSSL.crypto.FILETYPE_ASN1, pkg_resources.resource_string(
|
||||||
'acme.jose', os.path.join('testdata', 'cert.der'))))
|
'acme', os.path.join('testdata', 'cert.der'))))
|
||||||
|
|
||||||
|
|
||||||
class ErrorTest(unittest.TestCase):
|
class ErrorTest(unittest.TestCase):
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@ from acme import jose
|
|||||||
|
|
||||||
KEY = serialization.load_pem_private_key(
|
KEY = serialization.load_pem_private_key(
|
||||||
pkg_resources.resource_string(
|
pkg_resources.resource_string(
|
||||||
'acme.jose', os.path.join('testdata', 'rsa512_key.pem')),
|
'acme', os.path.join('testdata', 'rsa512_key.pem')),
|
||||||
password=None, backend=default_backend())
|
password=None, backend=default_backend())
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Vendored
+14
@@ -0,0 +1,14 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIICFjCCAcCgAwIBAgICBTkwDQYJKoZIhvcNAQELBQAwdzELMAkGA1UEBhMCVVMx
|
||||||
|
ETAPBgNVBAgMCE1pY2hpZ2FuMRIwEAYDVQQHDAlBbm4gQXJib3IxKzApBgNVBAoM
|
||||||
|
IlVuaXZlcnNpdHkgb2YgTWljaGlnYW4gYW5kIHRoZSBFRkYxFDASBgNVBAMMC2V4
|
||||||
|
YW1wbGUuY29tMB4XDTE0MTIxMTIyMzQ0NVoXDTE0MTIxODIyMzQ0NVowdzELMAkG
|
||||||
|
A1UEBhMCVVMxETAPBgNVBAgMCE1pY2hpZ2FuMRIwEAYDVQQHDAlBbm4gQXJib3Ix
|
||||||
|
KzApBgNVBAoMIlVuaXZlcnNpdHkgb2YgTWljaGlnYW4gYW5kIHRoZSBFRkYxFDAS
|
||||||
|
BgNVBAMMC2V4YW1wbGUuY29tMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKx1c7RR
|
||||||
|
7R/drnBSQ/zfx1vQLHUbFLh1AQQQ5R8DZUXd36efNK79vukFhN9HFoHZiUvOjm0c
|
||||||
|
+pVE6K+EdE/twuUCAwEAAaM2MDQwCQYDVR0TBAIwADAnBgNVHREEIDAeggtleGFt
|
||||||
|
cGxlLmNvbYIPd3d3LmV4YW1wbGUuY29tMA0GCSqGSIb3DQEBCwUAA0EASuvNKFTF
|
||||||
|
nTJsvnSXn52f4BMZJJ2id/kW7+r+FJRm+L20gKQ1aqq8d3e/lzRUrv5SMf1TAOe7
|
||||||
|
RDjyGMKy5ZgM2w==
|
||||||
|
-----END CERTIFICATE-----
|
||||||
Vendored
+13
@@ -0,0 +1,13 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIB3jCCAYigAwIBAgICBTkwDQYJKoZIhvcNAQELBQAwdzELMAkGA1UEBhMCVVMx
|
||||||
|
ETAPBgNVBAgMCE1pY2hpZ2FuMRIwEAYDVQQHDAlBbm4gQXJib3IxKzApBgNVBAoM
|
||||||
|
IlVuaXZlcnNpdHkgb2YgTWljaGlnYW4gYW5kIHRoZSBFRkYxFDASBgNVBAMMC2V4
|
||||||
|
YW1wbGUuY29tMB4XDTE0MTIxMTIyMzQ0NVoXDTE0MTIxODIyMzQ0NVowdzELMAkG
|
||||||
|
A1UEBhMCVVMxETAPBgNVBAgMCE1pY2hpZ2FuMRIwEAYDVQQHDAlBbm4gQXJib3Ix
|
||||||
|
KzApBgNVBAoMIlVuaXZlcnNpdHkgb2YgTWljaGlnYW4gYW5kIHRoZSBFRkYxFDAS
|
||||||
|
BgNVBAMMC2V4YW1wbGUuY29tMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKx1c7RR
|
||||||
|
7R/drnBSQ/zfx1vQLHUbFLh1AQQQ5R8DZUXd36efNK79vukFhN9HFoHZiUvOjm0c
|
||||||
|
+pVE6K+EdE/twuUCAwEAATANBgkqhkiG9w0BAQsFAANBAC24z0IdwIVKSlntksll
|
||||||
|
vr6zJepBH5fMndfk3XJp10jT6VE+14KNtjh02a56GoraAvJAT5/H67E8GvJ/ocNn
|
||||||
|
B/o=
|
||||||
|
-----END CERTIFICATE-----
|
||||||
Vendored
+10
@@ -0,0 +1,10 @@
|
|||||||
|
-----BEGIN CERTIFICATE REQUEST-----
|
||||||
|
MIIBbjCCARgCAQAweTELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE1pY2hpZ2FuMRIw
|
||||||
|
EAYDVQQHDAlBbm4gQXJib3IxDDAKBgNVBAoMA0VGRjEfMB0GA1UECwwWVW5pdmVy
|
||||||
|
c2l0eSBvZiBNaWNoaWdhbjEUMBIGA1UEAwwLZXhhbXBsZS5jb20wXDANBgkqhkiG
|
||||||
|
9w0BAQEFAANLADBIAkEArHVztFHtH92ucFJD/N/HW9AsdRsUuHUBBBDlHwNlRd3f
|
||||||
|
p580rv2+6QWE30cWgdmJS86ObRz6lUTor4R0T+3C5QIDAQABoDowOAYJKoZIhvcN
|
||||||
|
AQkOMSswKTAnBgNVHREEIDAeggtleGFtcGxlLmNvbYIPd3d3LmV4YW1wbGUuY29t
|
||||||
|
MA0GCSqGSIb3DQEBCwUAA0EAZGBM8J1rRs7onFgtc76mOeoT1c3v0ZsEmxQfb2Wy
|
||||||
|
tmReY6X1N4cs38D9VSow+VMRu2LWkKvzS7RUFSaTaeQz1A==
|
||||||
|
-----END CERTIFICATE REQUEST-----
|
||||||
Vendored
+10
@@ -0,0 +1,10 @@
|
|||||||
|
-----BEGIN CERTIFICATE REQUEST-----
|
||||||
|
MIIBXTCCAQcCAQAweTELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE1pY2hpZ2FuMRIw
|
||||||
|
EAYDVQQHDAlBbm4gQXJib3IxDDAKBgNVBAoMA0VGRjEfMB0GA1UECwwWVW5pdmVy
|
||||||
|
c2l0eSBvZiBNaWNoaWdhbjEUMBIGA1UEAwwLZXhhbXBsZS5jb20wXDANBgkqhkiG
|
||||||
|
9w0BAQEFAANLADBIAkEArHVztFHtH92ucFJD/N/HW9AsdRsUuHUBBBDlHwNlRd3f
|
||||||
|
p580rv2+6QWE30cWgdmJS86ObRz6lUTor4R0T+3C5QIDAQABoCkwJwYJKoZIhvcN
|
||||||
|
AQkOMRowGDAWBgNVHREEDzANggtleGFtcGxlLmNvbTANBgkqhkiG9w0BAQsFAANB
|
||||||
|
AHJH/O6BtC9aGzEVCMGOZ7z9iIRHWSzr9x/bOzn7hLwsbXPAgO1QxEwL+X+4g20G
|
||||||
|
n9XBE1N9W6HCIEut2d8wACg=
|
||||||
|
-----END CERTIFICATE REQUEST-----
|
||||||
Vendored
+14
@@ -0,0 +1,14 @@
|
|||||||
|
-----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-----
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
"""Tests for letsencrypt.plugins.common."""
|
"""Tests for letsencrypt.plugins.common."""
|
||||||
|
import os
|
||||||
import pkg_resources
|
import pkg_resources
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
@@ -111,9 +112,9 @@ class DvsniTest(unittest.TestCase):
|
|||||||
"""Tests for letsencrypt.plugins.common.DvsniTest."""
|
"""Tests for letsencrypt.plugins.common.DvsniTest."""
|
||||||
|
|
||||||
rsa256_file = pkg_resources.resource_filename(
|
rsa256_file = pkg_resources.resource_filename(
|
||||||
"acme.jose", "testdata/rsa256_key.pem")
|
"letsencrypt.tests", os.path.join("testdata", "rsa256_key.pem"))
|
||||||
rsa256_pem = pkg_resources.resource_string(
|
rsa256_pem = pkg_resources.resource_string(
|
||||||
"acme.jose", "testdata/rsa256_key.pem")
|
"letsencrypt.tests", os.path.join("testdata", "rsa256_key.pem"))
|
||||||
|
|
||||||
auth_key = le_util.Key(rsa256_file, rsa256_pem)
|
auth_key = le_util.Key(rsa256_file, rsa256_pem)
|
||||||
achalls = [
|
achalls = [
|
||||||
|
|||||||
@@ -20,9 +20,9 @@ from letsencrypt.tests import acme_util
|
|||||||
|
|
||||||
|
|
||||||
KEY_PATH = pkg_resources.resource_filename(
|
KEY_PATH = pkg_resources.resource_filename(
|
||||||
"acme.jose", os.path.join("testdata", "rsa512_key.pem"))
|
"letsencrypt.tests", os.path.join("testdata", "rsa512_key.pem"))
|
||||||
KEY_DATA = pkg_resources.resource_string(
|
KEY_DATA = pkg_resources.resource_string(
|
||||||
"acme.jose", os.path.join("testdata", "rsa512_key.pem"))
|
"letsencrypt.tests", os.path.join("testdata", "rsa512_key.pem"))
|
||||||
KEY = jose.JWKRSA(key=jose.ComparableRSAKey(serialization.load_pem_private_key(
|
KEY = jose.JWKRSA(key=jose.ComparableRSAKey(serialization.load_pem_private_key(
|
||||||
KEY_DATA, password=None, backend=default_backend())))
|
KEY_DATA, password=None, backend=default_backend())))
|
||||||
PRIVATE_KEY = OpenSSL.crypto.load_privatekey(
|
PRIVATE_KEY = OpenSSL.crypto.load_privatekey(
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ from letsencrypt import errors
|
|||||||
|
|
||||||
|
|
||||||
KEY = jose.JWKRSA.load(pkg_resources.resource_string(
|
KEY = jose.JWKRSA.load(pkg_resources.resource_string(
|
||||||
__name__, os.path.join("testdata", "rsa512_key.pem")))
|
"letsencrypt.tests", os.path.join("testdata", "rsa512_key_2.pem")))
|
||||||
|
|
||||||
|
|
||||||
class AccountTest(unittest.TestCase):
|
class AccountTest(unittest.TestCase):
|
||||||
|
|||||||
@@ -24,7 +24,8 @@ class DVSNITest(unittest.TestCase):
|
|||||||
key = jose.JWKRSA(key=jose.ComparableRSAKey(
|
key = jose.JWKRSA(key=jose.ComparableRSAKey(
|
||||||
serialization.load_pem_private_key(
|
serialization.load_pem_private_key(
|
||||||
pkg_resources.resource_string(
|
pkg_resources.resource_string(
|
||||||
"acme.jose", os.path.join("testdata", "rsa512_key.pem")),
|
"letsencrypt.tests", os.path.join(
|
||||||
|
"testdata", "rsa512_key.pem")),
|
||||||
password=None, backend=default_backend())))
|
password=None, backend=default_backend())))
|
||||||
|
|
||||||
from letsencrypt.achallenges import DVSNI
|
from letsencrypt.achallenges import DVSNI
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ import mock
|
|||||||
|
|
||||||
|
|
||||||
RSA256_KEY = pkg_resources.resource_string(
|
RSA256_KEY = pkg_resources.resource_string(
|
||||||
'acme.jose', os.path.join('testdata', 'rsa256_key.pem'))
|
'letsencrypt.tests', os.path.join('testdata', 'rsa256_key.pem'))
|
||||||
RSA512_KEY = pkg_resources.resource_string(
|
RSA512_KEY = pkg_resources.resource_string(
|
||||||
'acme.jose', os.path.join('testdata', 'rsa512_key.pem'))
|
'letsencrypt.tests', os.path.join('testdata', 'rsa512_key.pem'))
|
||||||
CERT = pkg_resources.resource_string(
|
CERT = pkg_resources.resource_string(
|
||||||
'letsencrypt.tests', os.path.join('testdata', 'cert.pem'))
|
'letsencrypt.tests', os.path.join('testdata', 'cert.pem'))
|
||||||
SAN_CERT = pkg_resources.resource_string(
|
SAN_CERT = pkg_resources.resource_string(
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ from letsencrypt.display import util as display_util
|
|||||||
|
|
||||||
BASE_PACKAGE = "letsencrypt.tests"
|
BASE_PACKAGE = "letsencrypt.tests"
|
||||||
CERT0_PATH = pkg_resources.resource_filename(
|
CERT0_PATH = pkg_resources.resource_filename(
|
||||||
"acme.jose", os.path.join("testdata", "cert.der"))
|
BASE_PACKAGE, os.path.join("testdata", "cert.der"))
|
||||||
CERT2_PATH = pkg_resources.resource_filename(
|
CERT2_PATH = pkg_resources.resource_filename(
|
||||||
BASE_PACKAGE, os.path.join("testdata", "dsa_cert.pem"))
|
BASE_PACKAGE, os.path.join("testdata", "dsa_cert.pem"))
|
||||||
CERT2_KEY_PATH = pkg_resources.resource_filename(
|
CERT2_KEY_PATH = pkg_resources.resource_filename(
|
||||||
@@ -27,7 +27,7 @@ CERT2_KEY_PATH = pkg_resources.resource_filename(
|
|||||||
CERT3_PATH = pkg_resources.resource_filename(
|
CERT3_PATH = pkg_resources.resource_filename(
|
||||||
BASE_PACKAGE, os.path.join("testdata", "matching_cert.pem"))
|
BASE_PACKAGE, os.path.join("testdata", "matching_cert.pem"))
|
||||||
CERT3_KEY_PATH = pkg_resources.resource_filename(
|
CERT3_KEY_PATH = pkg_resources.resource_filename(
|
||||||
BASE_PACKAGE, os.path.join("testdata", "rsa512_key.pem"))
|
BASE_PACKAGE, os.path.join("testdata", "rsa512_key_2.pem"))
|
||||||
with open(CERT3_KEY_PATH) as cert3_file:
|
with open(CERT3_KEY_PATH) as cert3_file:
|
||||||
CERT3_KEY = serialization.load_pem_private_key(
|
CERT3_KEY = serialization.load_pem_private_key(
|
||||||
cert3_file.read(), password=None,
|
cert3_file.read(), password=None,
|
||||||
|
|||||||
@@ -296,7 +296,7 @@ class RenewableCertTests(unittest.TestCase):
|
|||||||
|
|
||||||
def _test_notafterbefore(self, function, timestamp):
|
def _test_notafterbefore(self, function, timestamp):
|
||||||
test_cert = pkg_resources.resource_string(
|
test_cert = pkg_resources.resource_string(
|
||||||
"letsencrypt.tests", "testdata/cert.pem")
|
"letsencrypt.tests", os.path.join("testdata", "cert.pem"))
|
||||||
os.symlink(os.path.join("..", "..", "archive", "example.org",
|
os.symlink(os.path.join("..", "..", "archive", "example.org",
|
||||||
"cert12.pem"), self.test_rc.cert)
|
"cert12.pem"), self.test_rc.cert)
|
||||||
with open(self.test_rc.cert, "w") as f:
|
with open(self.test_rc.cert, "w") as f:
|
||||||
@@ -320,7 +320,7 @@ class RenewableCertTests(unittest.TestCase):
|
|||||||
"""Test should_autodeploy() and should_autorenew() on the basis
|
"""Test should_autodeploy() and should_autorenew() on the basis
|
||||||
of expiry time windows."""
|
of expiry time windows."""
|
||||||
test_cert = pkg_resources.resource_string(
|
test_cert = pkg_resources.resource_string(
|
||||||
"letsencrypt.tests", "testdata/cert.pem")
|
"letsencrypt.tests", os.path.join("testdata", "cert.pem"))
|
||||||
for kind in ALL_FOUR:
|
for kind in ALL_FOUR:
|
||||||
where = getattr(self.test_rc, kind)
|
where = getattr(self.test_rc, kind)
|
||||||
os.symlink(os.path.join("..", "..", "archive", "example.org",
|
os.symlink(os.path.join("..", "..", "archive", "example.org",
|
||||||
@@ -562,7 +562,7 @@ class RenewableCertTests(unittest.TestCase):
|
|||||||
from letsencrypt import renewer
|
from letsencrypt import renewer
|
||||||
|
|
||||||
test_cert = pkg_resources.resource_string(
|
test_cert = pkg_resources.resource_string(
|
||||||
"letsencrypt.tests", "testdata/cert-san.pem")
|
"letsencrypt.tests", os.path.join("testdata", "cert-san.pem"))
|
||||||
for kind in ALL_FOUR:
|
for kind in ALL_FOUR:
|
||||||
os.symlink(os.path.join("..", "..", "archive", "example.org",
|
os.symlink(os.path.join("..", "..", "archive", "example.org",
|
||||||
kind + "1.pem"),
|
kind + "1.pem"),
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ class RevokerTest(RevokerBase):
|
|||||||
mock_display().confirm_revocation.return_value = True
|
mock_display().confirm_revocation.return_value = True
|
||||||
|
|
||||||
key_path = pkg_resources.resource_filename(
|
key_path = pkg_resources.resource_filename(
|
||||||
"acme.jose", os.path.join("testdata", "rsa256_key.pem"))
|
"letsencrypt.tests", os.path.join("testdata", "rsa256_key.pem"))
|
||||||
|
|
||||||
wrong_key = le_util.Key(key_path, open(key_path).read())
|
wrong_key = le_util.Key(key_path, open(key_path).read())
|
||||||
self.revoker.revoke_from_key(wrong_key)
|
self.revoker.revoke_from_key(wrong_key)
|
||||||
|
|||||||
Vendored
BIN
Binary file not shown.
+6
@@ -0,0 +1,6 @@
|
|||||||
|
-----BEGIN RSA PRIVATE KEY-----
|
||||||
|
MIGrAgEAAiEAm2Fylv+Uz7trgTW8EBHP3FQSMeZs2GNQ6VRo1sIVJEkCAwEAAQIh
|
||||||
|
AJT0BA/xD01dFCAXzSNyj9nfSZa3NpqzJZZn/eOm7vghAhEAzUVNZn4lLLBD1R6N
|
||||||
|
E8TKNQIRAMHHyn3O5JeY36lwKwkUlEUCEAliRauN0L0+QZuYjfJ9aJECEGx4dru3
|
||||||
|
rTPCyighdqWNlHUCEQCiLjlwSRtWgmMBudCkVjzt
|
||||||
|
-----END RSA PRIVATE KEY-----
|
||||||
+7
-7
@@ -1,9 +1,9 @@
|
|||||||
-----BEGIN RSA PRIVATE KEY-----
|
-----BEGIN RSA PRIVATE KEY-----
|
||||||
MIIBOwIBAAJBAPS2EXFRNza/qpXnnBHF/CcFQ543htV+7nLAmrLrmTNHtPXJmLlM
|
MIIBOgIBAAJBAKx1c7RR7R/drnBSQ/zfx1vQLHUbFLh1AQQQ5R8DZUXd36efNK79
|
||||||
8SJDIzv/ceAFXL110VzxFfi81lpH5E5c0TMCAwEAAQJBALmppYQ/JVARjWBcsEm/
|
vukFhN9HFoHZiUvOjm0c+pVE6K+EdE/twuUCAwEAAQJAMbrEnJCrQe8YqAbw1/Bn
|
||||||
1/bXBJ127YLv4gQIY5baL4r6IdEE33OXMTTmD9wf+ajuq1eaH0htHkwhOvREu0sz
|
elAzIamndfE3U8bTavf9sgFpS4HL83rhd6PDbvx81ucaJAT/5x048fM/nFl4fzAc
|
||||||
bskCIQD/Cg+xhEVLcwK3pFp3afPIhj1IPFiL3Uy/nqyMZ6O/RQIhAPWiDBofp7Cp
|
mQIhAOF/a9o3EIsDKEmUl+Z1OaOiUxDF3kqWSmALEsmvDhwXAiEAw8ljV5RO/rUp
|
||||||
J4dGZs+hkRySq/IOeeRJlNK1Pq64nToXAiBZ7+te1100YSd5KT051SRB94zO13EG
|
Zu2YMDFq3MKpyyMgBIJ8CxmGRc6gCmMCIGRQzkcmhfqBrhOFwkmozrqIBRIKJIjj
|
||||||
SZESFduVW8rz3QIgK+tLiqg6TYYRQUi/PUTAM4GuKNuZw828RGiPyqHLywUCIQCd
|
8TRm2LXWZZ2DAiAqVO7PztdNpynugUy4jtbGKKjBrTSNBRGA7OHlUgm0dQIhALQq
|
||||||
pkZrNphL/y0D7HSbPIfZzD90M2V8tUjlK0BTqk1bHA==
|
6oGU29Vxlvt3k0vmiRKU4AVfLyNXIGtcWcNG46h/
|
||||||
-----END RSA PRIVATE KEY-----
|
-----END RSA PRIVATE KEY-----
|
||||||
|
|||||||
+9
@@ -0,0 +1,9 @@
|
|||||||
|
-----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-----
|
||||||
@@ -29,9 +29,9 @@ class ApacheTest(unittest.TestCase): # pylint: disable=too-few-public-methods
|
|||||||
self.temp_dir, "debian_apache_2_4/two_vhost_80/apache2")
|
self.temp_dir, "debian_apache_2_4/two_vhost_80/apache2")
|
||||||
|
|
||||||
self.rsa256_file = pkg_resources.resource_filename(
|
self.rsa256_file = pkg_resources.resource_filename(
|
||||||
"acme.jose", "testdata/rsa256_key.pem")
|
"letsencrypt.tests", os.path.join("testdata", "rsa256_key.pem"))
|
||||||
self.rsa256_pem = pkg_resources.resource_string(
|
self.rsa256_pem = pkg_resources.resource_string(
|
||||||
"acme.jose", "testdata/rsa256_key.pem")
|
"letsencrypt.tests", os.path.join("testdata", "rsa256_key.pem"))
|
||||||
|
|
||||||
|
|
||||||
def get_apache_configurator(
|
def get_apache_configurator(
|
||||||
|
|||||||
@@ -26,9 +26,9 @@ class NginxTest(unittest.TestCase): # pylint: disable=too-few-public-methods
|
|||||||
self.config_path = os.path.join(self.temp_dir, "etc_nginx")
|
self.config_path = os.path.join(self.temp_dir, "etc_nginx")
|
||||||
|
|
||||||
self.rsa256_file = pkg_resources.resource_filename(
|
self.rsa256_file = pkg_resources.resource_filename(
|
||||||
"acme.jose", "testdata/rsa256_key.pem")
|
"letsencrypt.tests", os.path.join("testdata", "rsa256_key.pem"))
|
||||||
self.rsa256_pem = pkg_resources.resource_string(
|
self.rsa256_pem = pkg_resources.resource_string(
|
||||||
"acme.jose", "testdata/rsa256_key.pem")
|
"letsencrypt.tests", os.path.join("testdata", "rsa256_key.pem"))
|
||||||
|
|
||||||
|
|
||||||
def get_data_filename(filename):
|
def get_data_filename(filename):
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ acme_install_requires = [
|
|||||||
# load_pem_private/public_key (>=0.6)
|
# load_pem_private/public_key (>=0.6)
|
||||||
# rsa_recover_prime_factors (>=0.8)
|
# rsa_recover_prime_factors (>=0.8)
|
||||||
'cryptography>=0.8',
|
'cryptography>=0.8',
|
||||||
#'letsencrypt' # TODO: uses testdata vectors
|
|
||||||
'mock<1.1.0', # py26
|
'mock<1.1.0', # py26
|
||||||
'pyrfc3339',
|
'pyrfc3339',
|
||||||
'ndg-httpsclient', # urllib3 InsecurePlatformWarning (#304)
|
'ndg-httpsclient', # urllib3 InsecurePlatformWarning (#304)
|
||||||
|
|||||||
Reference in New Issue
Block a user