summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2019-12-03 16:00:44 -0500
committerJeff Forcier <jeff@bitprophet.org>2019-12-03 16:00:44 -0500
commit0e337055cbd65de8f411e1d07f19a40b19cd44f7 (patch)
tree0ab0edfacbcba652f70f4e103a1bede7196ef6d8
parent592b712174077f7f39ad81a47f6c02d779db4c98 (diff)
Rename old/new_format to be slightly more accurate (pem vs openssh)
-rw-r--r--paramiko/pkey.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/paramiko/pkey.py b/paramiko/pkey.py
index b9e6c613..312d0540 100644
--- a/paramiko/pkey.py
+++ b/paramiko/pkey.py
@@ -319,10 +319,10 @@ class PKey(object):
m = self.END_TAG.match(lines[end])
if keytype == tag:
- data = self._read_private_key_old_format(lines, end, password)
+ data = self._read_private_key_pem(lines, end, password)
pkformat = self._PRIVATE_KEY_FORMAT_ORIGINAL
elif keytype == "OPENSSH":
- data = self._read_private_key_new_format(
+ data = self._read_private_key_openssh(
lines[start:end], password
)
pkformat = self._PRIVATE_KEY_FORMAT_OPENSSH
@@ -337,7 +337,7 @@ class PKey(object):
err = "{}._read_private_key() spat out an unknown key format id '{}'"
raise SSHException(err.format(self.__class__.__name__, id_))
- def _read_private_key_old_format(self, lines, end, password):
+ def _read_private_key_pem(self, lines, end, password):
start = 0
# parse any headers first
headers = {}
@@ -384,7 +384,7 @@ class PKey(object):
).decryptor()
return decryptor.update(data) + decryptor.finalize()
- def _read_private_key_new_format(self, lines, password):
+ def _read_private_key_openssh(self, lines, password):
"""
Read the new OpenSSH SSH2 private key format available
since OpenSSH version 6.5