Re: [Qemu-block] [PATCH v9] ssh: switch from libssh2 to libssh

2019-06-14 Thread Philippe Mathieu-Daudé
On 6/14/19 4:30 PM, Max Reitz wrote: > On 14.06.19 16:26, Philippe Mathieu-Daudé wrote: >> On 6/13/19 9:31 PM, Max Reitz wrote: >>> On 13.06.19 15:20, Pino Toscano wrote: Rewrite the implementation of the ssh block driver to use libssh instead of libssh2. The libssh library has various

Re: [Qemu-block] [PATCH v9] ssh: switch from libssh2 to libssh

2019-06-14 Thread Philippe Mathieu-Daudé
On 6/14/19 4:34 PM, Max Reitz wrote: > On 14.06.19 16:29, Pino Toscano wrote: >> On Thursday, 13 June 2019 21:31:40 CEST Max Reitz wrote: >>> On 13.06.19 15:20, Pino Toscano wrote: [...] -case LIBSSH2_KNOWNHOST_CHECK_NOTFOUND: +case SSH_KNOWN_HOSTS_OTHER: ret =

Re: [Qemu-block] [PATCH v9] ssh: switch from libssh2 to libssh

2019-06-14 Thread Philippe Mathieu-Daudé
On 6/13/19 9:31 PM, Max Reitz wrote: > On 13.06.19 15:20, Pino Toscano wrote: >> Rewrite the implementation of the ssh block driver to use libssh instead >> of libssh2. The libssh library has various advantages over libssh2: >> - easier API for authentication (for example for using ssh-agent) >>

Re: [Qemu-block] [PATCH v9] ssh: switch from libssh2 to libssh

2019-06-14 Thread Pino Toscano
On Thursday, 13 June 2019 21:31:40 CEST Max Reitz wrote: > On 13.06.19 15:20, Pino Toscano wrote: > > -switch (r) { > > -case LIBSSH2_KNOWNHOST_CHECK_MATCH: > > +switch (state) { > > +case SSH_KNOWN_HOSTS_OK: > > /* OK */ > > -

Re: [Qemu-block] [PATCH v9] ssh: switch from libssh2 to libssh

2019-06-14 Thread Max Reitz
On 14.06.19 16:29, Pino Toscano wrote: > On Thursday, 13 June 2019 21:31:40 CEST Max Reitz wrote: >> On 13.06.19 15:20, Pino Toscano wrote: >>> -switch (r) { >>> -case LIBSSH2_KNOWNHOST_CHECK_MATCH: >>> +switch (state) { >>> +case SSH_KNOWN_HOSTS_OK: >>> /* OK */ >>> -

Re: [Qemu-block] [PATCH v9] ssh: switch from libssh2 to libssh

2019-06-14 Thread Max Reitz
On 14.06.19 16:26, Philippe Mathieu-Daudé wrote: > On 6/13/19 9:31 PM, Max Reitz wrote: >> On 13.06.19 15:20, Pino Toscano wrote: >>> Rewrite the implementation of the ssh block driver to use libssh instead >>> of libssh2. The libssh library has various advantages over libssh2: >>> - easier API

Re: [Qemu-block] [PATCH v9] ssh: switch from libssh2 to libssh

2019-06-13 Thread Eric Blake
On 6/13/19 2:31 PM, Max Reitz wrote: >> @@ -657,71 +644,147 @@ static int connect_to_ssh(BDRVSSHState *s, >> BlockdevOptionsSsh *opts, > > [...] > >> +/* >> + * Try to disable the Nagle algorithm on TCP sockets to reduce latency, >> + * but do not fail if it cannot be disabled. >>

Re: [Qemu-block] [PATCH v9] ssh: switch from libssh2 to libssh

2019-06-13 Thread Max Reitz
On 13.06.19 15:20, Pino Toscano wrote: > Rewrite the implementation of the ssh block driver to use libssh instead > of libssh2. The libssh library has various advantages over libssh2: > - easier API for authentication (for example for using ssh-agent) > - easier API for known_hosts handling > -

Re: [Qemu-block] [PATCH v9] ssh: switch from libssh2 to libssh

2019-06-13 Thread Philippe Mathieu-Daudé
On 6/13/19 3:20 PM, Pino Toscano wrote: > Rewrite the implementation of the ssh block driver to use libssh instead > of libssh2. The libssh library has various advantages over libssh2: > - easier API for authentication (for example for using ssh-agent) > - easier API for known_hosts handling > -

[Qemu-block] [PATCH v9] ssh: switch from libssh2 to libssh

2019-06-13 Thread Pino Toscano
Rewrite the implementation of the ssh block driver to use libssh instead of libssh2. The libssh library has various advantages over libssh2: - easier API for authentication (for example for using ssh-agent) - easier API for known_hosts handling - supports newer types of keys in known_hosts Use