Skip to content

Commit

Permalink
Add comment to sshkey.c to explain commit 66d2e6
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dorrellmw committed Sep 1, 2023
1 parent 6ab3762 commit a922042
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sshkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit a922042

Please sign in to comment.