From 47651b1ff2e5dd0c788d744dc1b1d5587107f71a Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Thu, 28 Jun 2012 14:29:15 +1200 Subject: Serialization and de-serialization of new cert format. --- test/tutils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test/tutils.py') diff --git a/test/tutils.py b/test/tutils.py index da1cf662..79a1da39 100644 --- a/test/tutils.py +++ b/test/tutils.py @@ -2,6 +2,7 @@ import threading, Queue, time import os, shutil, tempfile from contextlib import contextmanager from libmproxy import proxy, flow, controller, utils +from netlib import certutils import human_curl as hurl import libpathod.test import random @@ -19,7 +20,8 @@ def tresp(req=None): req = treq() headers = flow.ODictCaseless() headers["header_response"] = ["svalue"] - return flow.Response(req, (1, 1), 200, "message", headers, "content_response", None) + cert = certutils.SSLCert.from_der(file(test_data.path("data/dercert")).read()) + return flow.Response(req, (1, 1), 200, "message", headers, "content_response", cert) def tflow(): -- cgit v1.2.3