summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2023-04-14 14:48:01 -0400
committerJeff Forcier <jeff@bitprophet.org>2023-05-05 12:26:56 -0400
commit57c33481fda5cd9338df2bb4d5c090f50bcc7343 (patch)
treebab08143b210da992e8ebe89e9386b0b01a1ceaa /tests
parent80556bdc9944df60eb0a06c3985bcf2dae1376e2 (diff)
Add new PKey.fingerprint property at long last
Diffstat (limited to 'tests')
-rw-r--r--tests/test_pkey.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_pkey.py b/tests/test_pkey.py
index 4d74d8aa..477da0e3 100644
--- a/tests/test_pkey.py
+++ b/tests/test_pkey.py
@@ -643,6 +643,16 @@ class KeyTest(unittest.TestCase):
for key1, key2 in self.keys():
assert hash(key1) == hash(key2)
+ def test_new_fingerprint(self):
+ # Assumes the RSA, DSS, ECDSA, Ed25519 order seen in 'def keys'.
+ fingerprints = [x.fingerprint for x, _ in self.keys()]
+ assert fingerprints == [
+ "SHA256:OhNL391d/beeFnxxg18AwWVYTAHww+D4djEE7Co0Yng",
+ "SHA256:uHwwykG099f4M4kfzvFpKCTino0/P03DRbAidpAmPm0",
+ "SHA256:BrQG04oNKUETjKCeL4ifkARASg3yxS/pUHl3wWM26Yg",
+ "SHA256:J6VESFdD3xSChn8y9PzWzeF+1tl892mOy2TqkMLO4ow",
+ ]
+
def test_ed25519_nonbytes_password(self):
# https://github.com/paramiko/paramiko/issues/1039
Ed25519Key.from_private_key_file(