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), address=dict(address=(host, port), use_ipv6=False),
state=[], state=[],
source_address=None, #source_address=dict(address=(host, port), use_ipv6=False), 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); f = http.HTTPFlow(c,s);
headers = ODictCaseless() headers = ODictCaseless()

View File

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