added sni and ssl_established=true in ServerConnection. removed check for None value of server_conn in http.py

This commit is contained in:
Marcelo Glezer 2015-02-12 13:41:58 -03:00
parent 71a58289e2
commit 010b921a93
2 changed files with 4 additions and 5 deletions

View File

@ -777,7 +777,9 @@ class FlowMaster(controller.Master):
address=dict(address=(host, port), use_ipv6=False),
state=[],
source_address=None, #source_address=dict(address=(host, port), use_ipv6=False),
cert=None
cert=None,
sni=host,
ssl_established=True
))
f = http.HTTPFlow(c,s);
headers = ODictCaseless()

View File

@ -1457,10 +1457,7 @@ class RequestReplayThread(threading.Thread):
server = ServerConnection(server_address)
server.connect()
if r.scheme == "https":
sni = None
if self.flow.server_conn:
sni = self.flow.server_conn.sni
server.establish_ssl(self.config.clientcerts, sni=sni)
server.establish_ssl(self.config.clientcerts, sni=self.flow.server_conn.sni)
r.form_out = "relative"
server.send(r.assemble())
self.flow.server_conn = server