1
0
mirror of https://github.com/certbot/certbot.git synced 2026-01-23 07:20:55 +03:00

Merge remote-tracking branch 'github/letsencrypt/master' into py2.6-3

This commit is contained in:
Jakub Warmuz
2015-10-18 19:31:16 +00:00
3 changed files with 15 additions and 23 deletions

View File

@@ -7,7 +7,7 @@ services:
# http://docs.travis-ci.com/user/ci-environment/#CI-environment-OS
# gimme has to be kept in sync with Boulder's Go version setting in .travis.yml
before_install:
- '[ "xxx$BOULDER_INTEGRATION" = "xxx" ] || eval "$(gimme 1.5)"'
- '[ "xxx$BOULDER_INTEGRATION" = "xxx" ] || eval "$(gimme 1.5.1)"'
# using separate envs with different TOXENVs creates 4x1 Travis build
# matrix, which allows us to clearly distinguish which component under

View File

@@ -35,14 +35,21 @@ class ACMEServerMixinTest(unittest.TestCase):
def setUp(self):
from acme.standalone import ACMEServerMixin
class _MockHandler(socketserver.BaseRequestHandler):
# pylint: disable=missing-docstring,no-member,no-init
def handle(self):
self.request.sendall(b"DONE")
class _MockServer(socketserver.TCPServer, ACMEServerMixin):
def __init__(self, *args, **kwargs):
socketserver.TCPServer.__init__(self, *args, **kwargs)
ACMEServerMixin.__init__(self)
self.server = _MockServer(("", 0), socketserver.BaseRequestHandler)
self.server = _MockServer(("", 0), _MockHandler)
def _busy_wait(self): # pragma: no cover
# This function is used to avoid race coditions in tests, but
# This function is used to avoid race conditions in tests, but
# not all of the functionality is always used, hence "no
# cover"
while True:
@@ -53,6 +60,7 @@ class ACMEServerMixinTest(unittest.TestCase):
except socket.error:
pass
else:
sock.recv(4) # wait until handle_request is actually called
break
finally:
sock.close()

View File

@@ -27,30 +27,14 @@ common() {
"$@"
}
# TODO: boulder#985
common_dvsni() {
common \
--standalone-supported-challenges dvsni \
--dvsni-port 5001 \
--simple-http-port 0 \
"$@"
}
common_http() {
common \
--standalone-supported-challenges simpleHttp \
--dvsni-port 0 \
--simple-http-port ${SIMPLE_HTTP_PORT:-5001} \
"$@"
}
common_dvsni --domains le1.wtf auth
common_http --domains le2.wtf run
common_http -a manual -d le.wtf auth
common --domains le1.wtf --standalone-supported-challenges dvsni auth
common --domains le2.wtf --standalone-supported-challenges simpleHttp run
common -a manual -d le.wtf auth
export CSR_PATH="${root}/csr.der" KEY_PATH="${root}/key.pem" \
OPENSSL_CNF=examples/openssl.cnf
./examples/generate-csr.sh le3.wtf
common_dvsni auth --csr "$CSR_PATH" \
common auth --csr "$CSR_PATH" \
--cert-path "${root}/csr/cert.pem" \
--chain-path "${root}/csr/chain.pem"
openssl x509 -in "${root}/csr/0000_cert.pem" -text