https://bugzilla.mindrot.org/show_bug.cgi?id=3565
Bug ID: 3565 Summary: keygen do_download_sk() incorrect return value Product: Portable OpenSSH Version: 8.5p1 Hardware: Other OS: Windows 10 Status: NEW Severity: minor Priority: P5 Component: ssh-keygen Assignee: unassigned-b...@mindrot.org Reporter: m.schm...@emtec.com do_download_sk(const char *skprovider, const char *device) in ssh-keygen.c returns an incorrect value, causing the ssh-keygen -K to exit with error when all is ok and vice versa. The end of function looks like this: if (i >= nkeys) ret = 0; /* success */ if (pass != NULL) freezero(pass, strlen(pass)); for (i = 0; i < nkeys; i++) sshkey_free(keys[i]); free(keys); return ret ? 0 : -1; Since ret = 0 is marked as success (see comment above and usual convention in openssh), just ret should be returned (the return value makes its way to the program as the exit code). -- You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ openssh-bugs mailing list openssh-bugs@mindrot.org https://lists.mindrot.org/mailman/listinfo/openssh-bugs