From a9220429754136693d2fa22c5e261e8bfc38dc4c Mon Sep 17 00:00:00 2001 From: Mitchell Dorrell Date: Fri, 1 Sep 2023 13:53:43 -0400 Subject: [PATCH] Add comment to sshkey.c to explain commit 66d2e6 Add a corresponding comment in sshkey.c to clarify the reason for a previous commit, so that future review doesn't need to reference the commit message. --- sshkey.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sshkey.c b/sshkey.c index 3d080fa8c26..bfdbfd67687 100644 --- a/sshkey.c +++ b/sshkey.c @@ -2761,6 +2761,11 @@ sshkey_private_to_blob2(struct sshkey *prv, struct sshbuf *blob, kdfname = "none"; } else if (ciphername == NULL) ciphername = DEFAULT_CIPHERNAME; + /* + * NOTE: Without OpenSSL, this string comparison is still safe, even + * though it will never match because the multithreaded cipher is not + * enabled. + */ else if (strcmp(ciphername, "chacha20-poly1305-mt@hpnssh.org") == 0) ciphername = "chacha20-poly1305@openssh.com"; if ((cipher = cipher_by_name(ciphername)) == NULL) {