Standalone

Internal class delegating to a module, and displaying warnings when attributes related to TLS-SNI-01 are accessed.

class acme.standalone.ACMEServerMixin[source]

ACME server common settings mixin.

class acme.standalone.BaseDualNetworkedServers(ServerClass, server_address, *remaining_args, **kwargs)[source]

Bases: object

Base class for a pair of IPv6 and IPv4 servers that tries to do everything it’s asked for both servers, but where failures in one server don’t affect the other.

If two servers are instantiated, they will serve on the same port.

serve_forever()[source]

Wraps socketserver.TCPServer.serve_forever

getsocknames()[source]

Wraps socketserver.TCPServer.socket.getsockname

shutdown_and_server_close()[source]

Wraps socketserver.TCPServer.shutdown, socketserver.TCPServer.server_close, and threading.Thread.join

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.HTTP01DualNetworkedServers(*args, **kwargs)[source]

Bases: acme.standalone.BaseDualNetworkedServers

HTTP01Server Wrapper. Tries everything for both. Failures for one don’t affect the other.

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

Bases: BaseHTTPServer.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(**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

log_message(format, *args)[source]

Log arbitrary message.

handle()[source]

Handle request.

handle_index()[source]

Handle index page.

handle_404()[source]

Handler 404 Not Found errors.

handle_simple_http_resource()[source]

Handle HTTP01 provisioned resources.

classmethod 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.

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

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

HTTP01 Server.

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

Bases: BaseHTTPServer.HTTPServer

Generic HTTP Server.

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

Bases: acme.standalone.BaseDualNetworkedServers

TLSSNI01Server Wrapper. Tries everything for both. Failures for one don’t affect the other.

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

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

TLSSNI01 Server.

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

Bases: SocketServer.TCPServer

Generic TLS Server.

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

Run simple standalone TLSSNI01 server.