Page MenuHomePhabricator

pki: Fix accidental ECC switch case fallthroughs into ed25119 cases when built without ECC

Authored by jvijtiuk on Sep 18 2017, 4:28 PM.



When ed25519 was introduced in commit 93c7b81b4ea1046bd2f65f4a510d5966786e8d3d,
the ed25519 case was added after the ecdsa case in src/pki.c. The ecdsa case seems to
have relied on falling through to report an error, when HAVE_ECC is not defined.
If HAVE_ECC is not defined, but ecdsa keys are used, with for example,
ssh_pki_import_pubkey_file, the code fallthroughs into the ed25519 case.

Signed-off-by: Juraj Vijtiuk <>

Test Plan

Unit tests passed. No memory leaks found with valgrind.

Diff Detail

rLIBSSH libssh
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

jvijtiuk created this revision.Sep 18 2017, 4:28 PM
jvijtiuk edited the summary of this revision. (Show Details)Dec 22 2017, 5:44 PM
This revision was not accepted when it landed; it landed in state Needs Review.Dec 28 2017, 8:47 PM
This revision was automatically updated to reflect the committed changes.