Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions mocket/ssl/socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import ssl
from datetime import datetime, timedelta
from ssl import Options
from typing import Any

from mocket.compat import encode_to_bytes
Expand Down Expand Up @@ -53,9 +54,9 @@ def getpeercert(self, binary_form: bool = False) -> _PeerCertRetDictType:
}

def ciper(self) -> tuple[str, str, str]:
return ("ADH", "AES256", "SHA")
return "ADH", "AES256", "SHA"

def compression(self) -> str | None:
def compression(self) -> Options:
return ssl.OP_NO_COMPRESSION

def unwrap(self) -> MocketSocket:
Expand Down
4 changes: 0 additions & 4 deletions mocket/utils.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
from __future__ import annotations

import binascii
import ssl
from typing import Callable

from mocket.compat import decode_from_bytes, encode_to_bytes

SSL_PROTOCOL = ssl.PROTOCOL_TLSv1_2


def hexdump(binary_string: bytes) -> str:
r"""
Expand Down Expand Up @@ -42,7 +39,6 @@ def get_mocketize(wrapper_: Callable) -> Callable:


__all__ = (
"SSL_PROTOCOL",
"get_mocketize",
"hexdump",
"hexload",
Expand Down