From 806c184161eae108cb97aab4629f0940f02a3198 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Fri, 22 Jul 2022 23:47:47 -0400 Subject: [PATCH] remove bizzare dead code (#7444) --- src/cryptography/hazmat/primitives/serialization/ssh.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/cryptography/hazmat/primitives/serialization/ssh.py b/src/cryptography/hazmat/primitives/serialization/ssh.py index 4ba095342875..f1e917d48a9d 100644 --- a/src/cryptography/hazmat/primitives/serialization/ssh.py +++ b/src/cryptography/hazmat/primitives/serialization/ssh.py @@ -672,9 +672,7 @@ def serialize_ssh_private_key( if ciph is not None: ciph.encryptor().update_into(buf[ofs:mlen], buf[ofs:]) - txt = _ssh_pem_encode(buf[:mlen]) - buf[ofs:mlen] = bytearray(slen) - return txt + return _ssh_pem_encode(buf[:mlen]) _SSH_PUBLIC_KEY_TYPES = typing.Union[