I guess I'll hold off on these changes until we reach a verdict on whether to use Aris's interface or a new ECDSA option.
Thanks for your comments and sorry for being such a style offender (about separating out return codes); I know I've been told multiple times, I swear it will stick in my brain this time. On Sat, Feb 15, 2014 at 4:27 AM, Andreas Schneider <a...@cryptomilk.org> wrote: > On Friday 14 February 2014 16:41:42 you wrote: >> For what it's worth, the attached patch should at fix the missing >> option (and remove some duplication in the key option code). > > Thanks for your patch. I have some comments. > > @@ -42,6 +42,7 @@ enum ssh_bind_options_e { > SSH_BIND_OPTIONS_HOSTKEY, > SSH_BIND_OPTIONS_DSAKEY, > SSH_BIND_OPTIONS_RSAKEY, > + SSH_BIND_OPTIONS_ECDSAKEY, > SSH_BIND_OPTIONS_BANNER, > SSH_BIND_OPTIONS_LOG_VERBOSITY, > SSH_BIND_OPTIONS_LOG_VERBOSITY_STR > > This will break the ABI. The option should be added at the end of the enum! > > I know that the style is pretty broken in libssh and I need to write a > styleguide. Please use 4 spaces and pki.c or pki_crypt.c should be the style > to use. > > > if (ssh_bind_set_key(sshbind, &sshbind->dsakey, value) < 0) { > > should be: > > rc = ssh_bind_set_key(sshbind, &sshbind->dsakey, value); > if (rc < 0) {} > > http://blog.cryptomilk.org/2013/03/28/writing-and-reading-code/ > > > I will integrate the full example soon. So we can work on that and extend it > with ecdsa support. > > > > -- andreas > >