minor fixes

This commit is contained in:
Maximilian Hils 2015-08-30 03:23:57 +02:00
parent 1dd09a5509
commit 21e7f420d2
2 changed files with 5 additions and 4 deletions

View File

@ -2,11 +2,11 @@ from __future__ import print_function, absolute_import
import os
import signal
import sys
import netlib.version
from netlib.version_check import check_pyopenssl_version, check_mitmproxy_version
from . import version, cmdline
from .proxy import process_proxy_options, ProxyServerError
from .exceptions import ServerException
from .proxy.server import DummyServer, ProxyServer
from .proxy.config import process_proxy_options
def assert_utf8_env():
@ -31,7 +31,7 @@ def get_server(dummy_server, options):
else:
try:
return ProxyServer(options)
except ProxyServerError as v:
except ServerException as v:
print(str(v), file=sys.stderr)
sys.exit(1)

View File

@ -66,7 +66,8 @@ class TlsLayer(Layer):
self._client_tls and self._server_tls and not self.config.no_upstream_cert
)
self._parse_client_hello()
if self._client_tls:
self._parse_client_hello()
if client_tls_requires_server_cert:
self._establish_tls_with_client_and_server()