cornflex 1.1.2__tar.gz → 1.1.3__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.2
3
+ Version: 1.1.3
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
@@ -38,8 +38,13 @@ class SFTPReader:
38
38
  )
39
39
  for key_type in self.preferred_keys:
40
40
  if key_type not in paramiko.Transport._key_info:
41
+ from cryptography.hazmat.primitives import hashes
41
42
  from paramiko.rsakey import RSAKey
42
- paramiko.Transport._key_info[key_type] = RSAKey
43
+
44
+ class _LegacyRSAKey(RSAKey):
45
+ HASHES = {**RSAKey.HASHES, "ssh-rsa": hashes.SHA1}
46
+
47
+ paramiko.Transport._key_info[key_type] = _LegacyRSAKey
43
48
  if self.preferred_kex:
44
49
  paramiko.Transport._preferred_kex = (
45
50
  tuple(self.preferred_kex) + paramiko.Transport._preferred_kex
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "cornflex"
7
- version = "1.1.2"
7
+ version = "1.1.3"
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