From 47c7e37723b416605f232cd85818f41d865a9f85 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Fri, 24 Jan 2014 10:46:34 +1300 Subject: Serve correct certs from app. Enable Windows and Android icons. --- libmproxy/app.py | 12 ++++++------ libmproxy/templates/index.html | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'libmproxy') diff --git a/libmproxy/app.py b/libmproxy/app.py index 5da7d6b2..b0692cf2 100644 --- a/libmproxy/app.py +++ b/libmproxy/app.py @@ -1,4 +1,5 @@ import flask +import os.path mapp = flask.Flask(__name__) mapp.debug = True @@ -13,15 +14,14 @@ def index(): @mapp.route("/cert/pem") def certs_pem(): - p = master().server.config.cacert + capath = master().server.config.cacert + p = os.path.splitext(capath)[0] + "-cert.pem" return flask.Response(open(p).read(), mimetype='application/x-x509-ca-cert') @mapp.route("/cert/p12") def certs_p12(): - return flask.render_template("certs.html", section="certs") + capath = master().server.config.cacert + p = os.path.splitext(capath)[0] + "-cert.p12" + return flask.Response(open(p).read(), mimetype='application/x-pkcs12') - -@mapp.route("/cert/cer") -def certs_cer(): - return flask.render_template("certs.html", section="certs") diff --git a/libmproxy/templates/index.html b/libmproxy/templates/index.html index cfa81dc2..d46d9854 100644 --- a/libmproxy/templates/index.html +++ b/libmproxy/templates/index.html @@ -8,9 +8,9 @@

-

+

-

+

-- cgit v1.2.3