cornflex 1.1.0__tar.gz → 1.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cornflex
3
- Version: 1.1.0
3
+ Version: 1.1.2
4
4
  Summary: simple sftp reader
5
5
  Project-URL: Homepage, https://github.com/ebremstedt/cornflex
6
6
  Project-URL: Issues, https://github.com/ebremstedt/cornflex/issues
@@ -22,6 +22,7 @@ class SFTPReader:
22
22
  encoding: str = "utf-8"
23
23
  preferred_keys: list[str] | None = None
24
24
  preferred_kex: list[str] | None = None
25
+ disabled_algorithms: dict | None = None
25
26
 
26
27
  def __post_init__(self) -> None:
27
28
  self._client: Optional[paramiko.SSHClient] = None
@@ -35,6 +36,10 @@ class SFTPReader:
35
36
  paramiko.Transport._preferred_keys = (
36
37
  tuple(self.preferred_keys) + paramiko.Transport._preferred_keys
37
38
  )
39
+ for key_type in self.preferred_keys:
40
+ if key_type not in paramiko.Transport._key_info:
41
+ from paramiko.rsakey import RSAKey
42
+ paramiko.Transport._key_info[key_type] = RSAKey
38
43
  if self.preferred_kex:
39
44
  paramiko.Transport._preferred_kex = (
40
45
  tuple(self.preferred_kex) + paramiko.Transport._preferred_kex
@@ -56,6 +61,8 @@ class SFTPReader:
56
61
  else:
57
62
  connect_kwargs["password"] = self.password
58
63
 
64
+ if self.disabled_algorithms is not None:
65
+ connect_kwargs["disabled_algorithms"] = self.disabled_algorithms
59
66
  self._client.connect(**connect_kwargs)
60
67
  self._sftp = self._client.open_sftp()
61
68
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "cornflex"
7
- version = "1.1.0"
7
+ version = "1.1.2"
8
8
  authors = [
9
9
  { name="Erik Bremstedt", email="erik.bremstedt@gmail.com" },
10
10
  ]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes