minor fixes

This commit is contained in:
Maximilian Hils 2020-12-21 20:52:02 +01:00
parent 57f5d1af63
commit de46db53e9
4 changed files with 6 additions and 13 deletions

View File

@ -1,6 +1,6 @@
import os import os
from pathlib import Path from pathlib import Path
from typing import List, Optional, Tuple, TypedDict, Union, Any from typing import List, Optional, Tuple, TypedDict, Any
from OpenSSL import SSL, crypto from OpenSSL import SSL, crypto
from mitmproxy import certs, ctx, exceptions from mitmproxy import certs, ctx, exceptions

View File

@ -22,8 +22,8 @@ class Method(Enum):
# TODO: remove once https://github.com/pyca/pyopenssl/pull/985 has landed. # TODO: remove once https://github.com/pyca/pyopenssl/pull/985 has landed.
SSL.Context._methods.setdefault(Method.TLS_SERVER_METHOD.value, "TLS_server_method") SSL.Context._methods.setdefault(Method.TLS_SERVER_METHOD.value, SSL._lib.TLS_server_method)
SSL.Context._methods.setdefault(Method.TLS_CLIENT_METHOD.value, "TLS_client_method") SSL.Context._methods.setdefault(Method.TLS_CLIENT_METHOD.value, SSL._lib.TLS_client_method)
class Version(Enum): class Version(Enum):

View File

@ -1,8 +1,6 @@
from typing import Optional, Sequence from typing import Optional, Sequence
from mitmproxy import optmanager from mitmproxy import optmanager
from mitmproxy.net import tls
CONF_DIR = "~/.mitmproxy" CONF_DIR = "~/.mitmproxy"
CONF_BASENAME = "mitmproxy" CONF_BASENAME = "mitmproxy"

View File

@ -1,8 +1,3 @@
import io
import pytest
from mitmproxy import exceptions
from mitmproxy.net import tls from mitmproxy.net import tls
CLIENT_HELLO_NO_EXTENSIONS = bytes.fromhex( CLIENT_HELLO_NO_EXTENSIONS = bytes.fromhex(
@ -11,9 +6,9 @@ CLIENT_HELLO_NO_EXTENSIONS = bytes.fromhex(
"61006200640100" "61006200640100"
) )
FULL_CLIENT_HELLO_NO_EXTENSIONS = ( FULL_CLIENT_HELLO_NO_EXTENSIONS = (
b"\x16\x03\x03\x00\x65" # record layer b"\x16\x03\x03\x00\x65" # record layer
b"\x01\x00\x00\x61" + # handshake header b"\x01\x00\x00\x61" + # handshake header
CLIENT_HELLO_NO_EXTENSIONS CLIENT_HELLO_NO_EXTENSIONS
) )