diff options
| -rw-r--r-- | README.md | 8 | ||||
| -rwxr-xr-x | tinydnsdyn | 7 |
2 files changed, 9 insertions, 6 deletions
@@ -9,10 +9,10 @@ It should run on any Linux or BSD with Python installed. ## Requirements * Administrative access to a server running tinydns and hence - daemontools or similar (such as runit in Void linux) -* Administrative access to a *nix box on you local network -* Python (version 2!) installed on both client and server -* An open port on the server's firewall + daemontools or similar (such as runit in Void linux). +* Administrative access to a *nix box on you local network. +* Python (>2.7.9) installed on both client and server. +* An open port on the server's firewall. ## Installation @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python2 # Copyright 2011-2016 Felix Hanley <felix@userspace.com.au> # @@ -198,7 +198,10 @@ def main(): httpd = HTTPServer((options.address, options.port), RequestHandler) if options.certfile and options.keyfile: - httpd.socket = ssl.wrap_socket(httpd.socket, certfile=certfile, keyfile=keyfile, server_side=True) + context = ssl.create_default_context(purpose=ssl.Purpose.CLIENT_AUTH) + context.load_cert_chain(options.certfile, options.keyfile) + httpd.socket = context.wrap_socket(httpd.socket, server_side=True) + httpd.serve_forever() |
