aboutsummaryrefslogtreecommitdiff
path: root/scripts/http-server.py
blob: 7716d5edcca0c7fdec101001ceaff8be248484d4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# $Id$

import rpki.https, tlslite.api, rpki.config

cfg = rpki.config.parser("http-demo.conf")
section = "server"

privateKey = rpki.x509.RSA(PEM_file = cfg.get(section, "https-key"))

certChain = rpki.x509.X509_chain()
certChain.load_from_PEM(cfg.multiget(section, "https-cert"))

def handler(query, path):
  return 200, "Path:    %s\nQuery:   %s" % (path, query)

rpki.https.server(privateKey=privateKey, certChain=certChain, handlers=handler)
Literal.String.Symbol */ .highlight .bp { color: #038 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #06B; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #369 } /* Name.Variable.Class */ .highlight .vg { color: #D70 } /* Name.Variable.Global */ .highlight .vi { color: #33B } /* Name.Variable.Instance */ .highlight .vm { color: #369 } /* Name.Variable.Magic */ .highlight .il { color: #00D; font-weight: bold } /* Literal.Number.Integer.Long */
# $Id$

all: repository-engine-objects.pdf bpki.pdf

bpki.pdf: bpki-symmetric.pdf bpki-asymmetric.pdf

.SUFFIXES: .pdf .dot .tex

.dot.pdf:
	dot -Tps2 $< | ps2pdf - $@

.tex.pdf:
	pdflatex $<
	pdflatex $<
	rm -f $*.log $*.aux