[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 0/3] Allow use of ssh_bind_accept_fd without ssh_bind_listen


Hi folks,

I noticed that ssh_bind_accept_fd doesn't appear to work on its own
for accepting fds that have come through an accept on a listening
socket.  It seems that server private keys are read in from their file
locations in ssh_bind_listen, so that if ssh_bind_accept_fd is used
instead without the intent to ever use ssh_bind_listen, then a
subsequent ssh_handle_key_exchange will always return an error
(server_set_kex in server.c wil return -1).

This patch allows keys to be set up in ssh_bind_accept_fd or
ssh_bind_listen, whichever is called first.  Then ssh_bind_accept_fd
can be called by itself.

v2:
- Style changes as suggested by Andreas

Alan Dunn (3):
  Separate out key import functionality from ssh_bind_listen
  Import keys during ssh_bind_accept_fd
  Test change to ssh_bind_accept_fd

 src/bind.c                      |   47 +++++++++----
 tests/test_ssh_bind_accept_fd.c |  139 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 173 insertions(+), 13 deletions(-)
 create mode 100644 tests/test_ssh_bind_accept_fd.c

-- 
1.7.9.5


Archive administrator: postmaster@lists.cynapses.org