[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/3] Import keys during ssh_bind_accept_fd
[Thread Prev] | [Thread Next]
- Subject: Re: [PATCH 2/3] Import keys during ssh_bind_accept_fd
- From: Andreas Schneider <asn@xxxxxxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Tue, 21 Jan 2014 09:10:01 +0100
- To: libssh@xxxxxxxxxx
On Friday 17 January 2014 17:01:50 Alan Dunn wrote:
> Signed-off-by: Alan Dunn <amdunn@xxxxxxxxx>
> ---
> src/bind.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/src/bind.c b/src/bind.c
> index e391738..95f9ae9 100644
> --- a/src/bind.c
> +++ b/src/bind.c
> @@ -422,6 +422,15 @@ int ssh_bind_accept_fd(ssh_bind sshbind, ssh_session
> session, socket_t fd){ ssh_socket_set_fd(session->socket, fd);
> ssh_socket_get_poll_handle_out(session->socket);
>
int rc;
> + /* We must try to import any keys that could be imported in case
> + * we are not using ssh_bind_listen (which is the other place
> + * where keys can be imported) on this ssh_bind and are instead
> + * only using ssh_bind_accept_fd to manage sockets ourselves.
> + */
> + if (ssh_bind_import_keys(sshbind) != SSH_OK) {
> + return SSH_ERROR;
> + }
rc = ssh_bind_import_keys(sshbind);
...
> +
> #ifdef HAVE_ECC
> if (sshbind->ecdsa) {
> session->srv.ecdsa_key = ssh_key_dup(sshbind->ecdsa);
--
Andreas Schneider GPG-ID: CC014E3D
www.cryptomilk.org asn@xxxxxxxxxxxxxx
| [PATCH 0/3] Allow use of ssh_bind_accept_fd without ssh_bind_listen | Alan Dunn <amdunn@xxxxxxxxx> |
| [PATCH 2/3] Import keys during ssh_bind_accept_fd | Alan Dunn <amdunn@xxxxxxxxx> |