summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin@dahyabhai.net>2014-02-07 18:03:29 -0500
committerGreg Hudson <ghudson@mit.edu>2014-06-02 18:47:03 -0400
commit142255ba9af4ce1016a8eadf147e599ee490f1f7 (patch)
treeb50a8cc5b5a0173c7a1cdc392753168da1df8792 /src/util
parentf78f8b1a46534db3a4547323ba952c1fa1b41fe9 (diff)
downloadkrb5-142255ba9af4ce1016a8eadf147e599ee490f1f7.tar.gz
krb5-142255ba9af4ce1016a8eadf147e599ee490f1f7.tar.xz
krb5-142255ba9af4ce1016a8eadf147e599ee490f1f7.zip
Add a simple KDC proxy test server
This proxy server uses python-paste to run the kdcproxy from https://pypi.python.org/pypi/kdcproxy. It should be used along with the proxy.pem certificate in ../tests/dejagnu/proxy-certs. ticket: 7929
Diffstat (limited to 'src/util')
-rwxr-xr-xsrc/util/paste-kdcproxy.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/util/paste-kdcproxy.py b/src/util/paste-kdcproxy.py
new file mode 100755
index 000000000..1e56b8954
--- /dev/null
+++ b/src/util/paste-kdcproxy.py
@@ -0,0 +1,18 @@
+#!/usr/bin/python
+import kdcproxy
+from paste import httpserver
+import os
+import sys
+
+if len(sys.argv) > 1:
+ port = sys.argv[1]
+else:
+ port = 8443
+if len(sys.argv) > 2:
+ pem = sys.argv[2]
+else:
+ pem = '*'
+server = httpserver.serve(kdcproxy.Application(), port=port, ssl_pem=pem,
+ start_loop=False)
+os.write(sys.stdout.fileno(), 'proxy server ready\n')
+server.serve_forever()