]> granicus.if.org Git - curl/commit
libssh: do not let libssh create socket
authorFelix Hädicke <felixhaedicke@web.de>
Wed, 23 Jan 2019 22:47:55 +0000 (23:47 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 24 Jan 2019 08:03:11 +0000 (09:03 +0100)
commit15c94b310bf9e0c92d71fca5a88eb67a1e2548a6
tree99544ca55c2ea3d376c5367d00d82ecb0cb22a69
parentc497cab49b90f515dd728ce2f510d8396f91f3f6
libssh: do not let libssh create socket

By default, libssh creates a new socket, instead of using the socket
created by curl for SSH connections.

Pass the socket created by curl to libssh using ssh_options_set() with
SSH_OPTIONS_FD directly after ssh_new(). So libssh uses our socket
instead of creating a new one.

This approach is very similar to what is done in the libssh2 code, where
the socket created by curl is passed to libssh2 when
libssh2_session_startup() is called.

Fixes #3491
Closes #3495
lib/ssh-libssh.c