Skip to content

updated type hints for paramiko to 3.4 - fix for CVE 2023-48795 (Terrapin Attack) #11218

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 2, 2024
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
2 changes: 1 addition & 1 deletion stubs/paramiko/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "3.3.*"
version = "3.4.*"
upstream_repository = "https://github.com/paramiko/paramiko"
# Requires a version of cryptography where cryptography.hazmat.primitives.ciphers.Cipher is generic
requires = ["cryptography>=37.0.0"]
Expand Down
2 changes: 2 additions & 0 deletions stubs/paramiko/paramiko/ssh_exception.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ class ProxyCommandFailure(SSHException):
error: str
def __init__(self, command: str, error: str) -> None: ...

class MessageOrderError(SSHException): ...

class NoValidConnectionsError(socket.error):
errors: Mapping[tuple[str, int] | tuple[str, int, int, int], Exception]
def __init__(self, errors: Mapping[tuple[str, int] | tuple[str, int, int, int], Exception]) -> None: ...
Expand Down
5 changes: 5 additions & 0 deletions stubs/paramiko/paramiko/transport.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ class _KexEngine(Protocol):
class Transport(Thread, ClosingContextManager):
active: bool
hostname: str | None
server_extensions: dict[str, bytes]
advertise_strict_kex: bool
agreed_on_strict_kex: bool
sock: socket | Channel
packetizer: Packetizer
local_version: str
Expand Down Expand Up @@ -81,6 +84,8 @@ class Transport(Thread, ClosingContextManager):
gss_deleg_creds: bool = True,
disabled_algorithms: Mapping[str, Iterable[str]] | None = None,
server_sig_algs: bool = True,
strict_kex: bool = True,
packetizer_class: type[Packetizer] | None = None,
) -> None: ...
@property
def preferred_ciphers(self) -> Sequence[str]: ...
Expand Down