aboutsummaryrefslogtreecommitdiff
path: root/scripts/http-server.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/http-server.py')
-rw-r--r--scripts/http-server.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/scripts/http-server.py b/scripts/http-server.py
index 8c302b9b..00e7b1ba 100644
--- a/scripts/http-server.py
+++ b/scripts/http-server.py
@@ -2,11 +2,16 @@
import rpki.https, tlslite.api
-if False:
- certInfo = rpki.https.CertInfo("Carol")
-else:
- certInfo = rpki.https.CertInfo()
+certInfo = rpki.https.CertInfo("Carol")
+# Ok, here's the problem: the certChain is order-sensitive.
+# We have to put the EE cert before the CA cert or things break.
+#
+# For the moment we can kludge this but in the general case we're
+# going to have to sort certs somehow. This is the second time this
+# problem has come up (CMS had the same issue).
+
+if True:
certChain = []
for file in ("biz-certs/Carol-EE.cer", "biz-certs/Carol-CA.cer"):
f = open(file, "r")
@@ -16,10 +21,6 @@ else:
certChain.append(x509)
certInfo.certChain = tlslite.api.X509CertChain(certChain)
- f = open("biz-certs/Carol-EE.key", "r")
- certInfo.privateKey = tlslite.api.parsePEMKey(f.read(), private=True)
- f.close()
-
def handler(self, query):
return 200, "I got:\n" + query