Standalone

Support for standalone client challenge solvers.

class acme.standalone.TLSServer(*args, **kwargs)[source]

Bases: socketserver.TCPServer

Generic TLS Server.

class acme.standalone.ACMEServerMixin[source]

Bases: object

ACME server common settings mixin.

class acme.standalone.TLSSNI01Server(server_address, certs)[source]

Bases: acme.standalone.TLSServer, acme.standalone.ACMEServerMixin

TLSSNI01 Server.

class acme.standalone.BaseRequestHandlerWithLogging(request, client_address, server)[source]

Bases: socketserver.BaseRequestHandler

BaseRequestHandler with logging.

log_message(format, *args)[source]

Log arbitrary message.

handle()[source]

Handle request.

class acme.standalone.HTTP01Server(server_address, resources)[source]

Bases: http.server.HTTPServer, acme.standalone.ACMEServerMixin

HTTP01 Server.

class acme.standalone.HTTP01RequestHandler(*args, **kwargs)[source]

Bases: http.server.BaseHTTPRequestHandler

HTTP01 challenge handler.

Adheres to the stdlib’s socketserver.BaseRequestHandler interface.

Variables:simple_http_resources (set) – A set of HTTP01Resource objects. TODO: better name?
class HTTP01Resource(chall, response, validation)

Bases: tuple

_asdict()

Return a new OrderedDict which maps field names to their values.

classmethod _make(iterable, new=<built-in method __new__ of type object>, len=<built-in function len>)

Make a new HTTP01Resource object from a sequence or iterable

_replace(_self, **kwds)

Return a new HTTP01Resource object replacing specified fields with new values

chall

Alias for field number 0

response

Alias for field number 1

validation

Alias for field number 2

HTTP01RequestHandler.log_message(format, *args)[source]

Log arbitrary message.

HTTP01RequestHandler.handle()[source]

Handle request.

HTTP01RequestHandler.handle_index()[source]

Handle index page.

HTTP01RequestHandler.handle_404()[source]

Handler 404 Not Found errors.

HTTP01RequestHandler.handle_simple_http_resource()[source]

Handle HTTP01 provisioned resources.

classmethod HTTP01RequestHandler.partial_init(simple_http_resources)[source]

Partially initialize this handler.

This is useful because socketserver.BaseServer takes uninitialized handler and initializes it with the current request.

acme.standalone.simple_tls_sni_01_server(cli_args, forever=True)[source]

Run simple standalone TLSSNI01 server.