Skip to content

Commit

Permalink
Small cleanup (#275)
Browse files Browse the repository at this point in the history
* Small cleanup.
  • Loading branch information
mindflayer authored Nov 26, 2024
1 parent e529319 commit 9cfad4c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
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

0 comments on commit 9cfad4c

Please sign in to comment.