summaryrefslogtreecommitdiffhomepage
path: root/tests/test_pkey.py
diff options
context:
space:
mode:
authorJared Hobbs <jared@pyhacker.com>2018-11-27 17:48:12 -0700
committerJared Hobbs <jared@pyhacker.com>2018-11-27 17:48:12 -0700
commite72aeaf1baf8c042179b88c718dd5fab0cecb3d2 (patch)
tree33009883e46e2eb4a1e7982cd5f7b1da65845a5c /tests/test_pkey.py
parenteff204faf5624c51b7ac96b9b93e4ce9622f853a (diff)
blacken
Diffstat (limited to 'tests/test_pkey.py')
-rw-r--r--tests/test_pkey.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/test_pkey.py b/tests/test_pkey.py
index e934513d..f3b6fc7c 100644
--- a/tests/test_pkey.py
+++ b/tests/test_pkey.py
@@ -38,8 +38,8 @@ PUB_DSS = "ssh-dss AAAAB3NzaC1kc3MAAACBAOeBpgNnfRzr/twmAQRu2XwWAp3CFtrVnug6s6fgw
PUB_ECDSA_256 = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBJSPZm3ZWkvk/Zx8WP+fZRZ5/NBBHnGQwR6uIC6XHGPDIHuWUzIjAwA0bzqkOUffEsbLe+uQgKl5kbc/L8KA/eo="
PUB_ECDSA_384 = "ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBBbGibQLW9AAZiGN2hEQxWYYoFaWKwN3PKSaDJSMqmIn1Z9sgRUuw8Y/w502OGvXL/wFk0i2z50l3pWZjD7gfMH7gX5TUiCzwrQkS+Hn1U2S9aF5WJp0NcIzYxXw2r4M2A=="
PUB_ECDSA_521 = "ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBACaOaFLZGuxa5AW16qj6VLypFbLrEWrt9AZUloCMefxO8bNLjK/O5g0rAVasar1TnyHE9qj4NwzANZASWjQNbc4MAG8vzqezFwLIn/k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_DSS = "1024 44:78:f0:b9:a2:3c:c5:18:20:09:ff:75:5b:c1:d2:6c"
@@ -47,8 +47,8 @@ FINGER_ECDSA_256 = "256 25:19:eb:55:e6:a1:47:ff:4f:38:d2:75:6f:a5:d5:60"
FINGER_ECDSA_384 = "384 c1:8d:a0:59:09:47:41:8e:a8:a6:07:01:29:23:b4:65"
FINGER_ECDSA_521 = "521 44:58:22:52:12:33:16:0e:ce:0e:be:2c:7c:7e:cc:1e"
SIGNED_RSA = "20:d7:8a:31:21:cb:f7:92:12:f2:a4:89:37:f5:78:af:e6:16:b6:25:b9:97:3d:a2:cd:5f:ca:20:21:73:4c:ad:34:73:8f:20:77:28:e2:94:15:08:d8:91:40:7a:85:83:bf:18:37:95:dc:54:1a:9b:88:29:6c:73:ca:38:b4:04:f1:56:b9:f2:42:9d:52:1b:29:29:b4:4f:fd:c9:2d:af:47:d2:40:76:30:f3:63:45:0c:d9:1d:43:86:0f:1c:70:e2:93:12:34:f3:ac:c5:0a:2f:14:50:66:59:f1:88:ee:c1:4a:e9:d1:9c:4e:46:f0:0e:47:6f:38:74:f1:44:a8"
-FINGER_RSA_2K_OPENSSH = '2048 68:d1:72:01:bf:c0:0c:66:97:78:df:ce:75:74:46:d6'
-FINGER_DSS_1K_OPENSSH = '1024 cf:1d:eb:d7:61:d3:12:94:c6:c0:c6:54:35:35:b0:82'
+FINGER_RSA_2K_OPENSSH = "2048 68:d1:72:01:bf:c0:0c:66:97:78:df:ce:75:74:46:d6"
+FINGER_DSS_1K_OPENSSH = "1024 cf:1d:eb:d7:61:d3:12:94:c6:c0:c6:54:35:35:b0:82"
RSA_PRIVATE_OUT = """\
-----BEGIN RSA PRIVATE KEY-----
@@ -443,8 +443,8 @@ class KeyTest(unittest.TestCase):
def test_22_load_RSA_key_new_format(self):
key = RSAKey.from_private_key_file(
- _support('test_rsa_2k_o.key'), b'television')
- self.assertEqual('ssh-rsa', key.get_name())
+ _support("test_rsa_2k_o.key"), b"television")
+ self.assertEqual("ssh-rsa", key.get_name())
self.assertEqual(PUB_RSA_2K_OPENSSH.split()[1], key.get_base64())
self.assertEqual(2048, key.get_bits())
exp_rsa = b(FINGER_RSA_2K_OPENSSH.split()[1].replace(':', ''))
@@ -453,8 +453,8 @@ class KeyTest(unittest.TestCase):
def test_23_load_DSS_key_new_format(self):
key = DSSKey.from_private_key_file(
- _support('test_dss_1k_o.key'), b'television')
- self.assertEqual('ssh-dss', key.get_name())
+ _support("test_dss_1k_o.key"), b"television")
+ self.assertEqual("ssh-dss", key.get_name())
self.assertEqual(PUB_DSS_1K_OPENSSH.split()[1], key.get_base64())
self.assertEqual(1024, key.get_bits())
exp_rsa = b(FINGER_DSS_1K_OPENSSH.split()[1].replace(':', ''))