391
391
def connect_to_origin(self):
392
394
ssl_sock = ssl.wrap_socket(self.sock, self.key_file, self.cert_file,
393
395
cert_reqs=ssl.CERT_REQUIRED,
395
397
match_hostname(ssl_sock.getpeercert(), self.host)
397
399
# Wrap the ssl socket before anybody use it