mirror of
https://github.com/diafygi/acme-tiny
synced 2026-10-07 10:01:56 +03:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -9,6 +9,9 @@ explains how to setup and test acme-tiny yourself.
|
||||
1. Make a test subdomain for a server you control. Set it as an environmental
|
||||
variable on your local test setup.
|
||||
* On your local: `export TRAVIS_DOMAIN=travis-ci.gethttpsforfree.com`
|
||||
* Configure the webserver on `$TRAVIS_DOMAIN` for redirection of
|
||||
`http://$TRAVIS_DOMAIN/.well-known/acme-challenge/` to
|
||||
`http://localhost:8888/`
|
||||
2. Generate a shared secret between your local test setup and your server.
|
||||
* `openssl rand -base64 32`
|
||||
* On your local: `export TRAVIS_SESSION="<random_string_here>"`
|
||||
|
||||
+3
-1
@@ -29,7 +29,9 @@ def gen_keys():
|
||||
# subject alt-name domain
|
||||
san_csr = NamedTemporaryFile()
|
||||
san_conf = NamedTemporaryFile()
|
||||
san_conf.write(open("/etc/ssl/openssl.cnf").read().encode("utf8"))
|
||||
for openssl_cnf in ['/etc/pki/tls/openssl.cnf', '/etc/ssl/openssl.cnf']:
|
||||
if os.path.exists(openssl_cnf): break
|
||||
san_conf.write(open(openssl_cnf).read().encode("utf8"))
|
||||
san_conf.write("\n[SAN]\nsubjectAltName=DNS:{0}\n".format(DOMAIN).encode("utf8"))
|
||||
san_conf.seek(0)
|
||||
Popen(["openssl", "req", "-new", "-sha256", "-key", domain_key.name,
|
||||
|
||||
@@ -123,7 +123,7 @@ class TestModule(unittest.TestCase):
|
||||
self.assertIsInstance(result, ValueError)
|
||||
self.assertIn("Invalid character in DNS name", result.args[0])
|
||||
|
||||
def test_nonexistant_domain(self):
|
||||
def test_nonexistent_domain(self):
|
||||
""" Should be unable verify a nonexistent domain """
|
||||
try:
|
||||
result = acme_tiny.main([
|
||||
|
||||
Reference in New Issue
Block a user