[patch] ssh_event_dopoll returns SSH_AGAIN annotation

2019-02-25 Thread g4-lisz
Hi there, Just a small addition to the ssh_event_dopoll() annotations: It can also return SSH_AGAIN. Cheers, Till >From 860079f22f5f7ae38c28d6783af97c1d4289d2d8 Mon Sep 17 00:00:00 2001 From: Till Wimmer Date: Mon, 25 Feb 2019 17:09:45 +0100 Subject: [PATCH] ssh_event_dopoll can also return SSH

Re: Issues with channel callbacks

2019-02-25 Thread Tilo Eckert
Am 25.02.2019 um 11:51 schrieb g4-l...@tonarchiv.ch: > On 25.02.19 11:18, Tilo Eckert wrote: > >> 3) My data callback is executed exactly once for every received channel >> data packet. I think this should be changed to be more user-friendly: >> The data callback should be executed repeatedly unti

libssh and sftp server implementation

2019-02-25 Thread Александр Гундин
Hi! A am trying to implement SFTP server by using libssh. I built .lib and .dll files using instruction from site(by vcpkg). After client successfull autorize client(Filezilla) it ask for SFTP_SERVER_REALPATH. And for create answer I need to use *sftp_reply_names_add *and *sftp_reply_names *functi

Re: ssh_pki_import_pubkey_file checks for OPENSSH_HEADER_BEGIN

2019-02-25 Thread Jakub Jelen
On Mon, 2019-02-25 at 11:56 +0100, g4-l...@tonarchiv.ch wrote: > On 25.02.19 09:57, Jakub Jelen wrote: > > > On Sun, 2019-02-24 at 18:38 +0100, g4-l...@tonarchiv.ch wrote: > > > ... which IMHO does not make much sense: > > > > > > #define OPENSSH_HEADER_BEGIN "-BEGIN OPENSSH PRIVATE KEY-

Re: Issues with channel callbacks

2019-02-25 Thread g4-lisz
On 25.02.19 11:51, g4-l...@tonarchiv.ch wrote: > At least this is how I understand it... ... and I have to admit that I don't have any knowledge of the buffering mechanisms in libssh...

Re: ssh_pki_import_pubkey_file checks for OPENSSH_HEADER_BEGIN

2019-02-25 Thread g4-lisz
On 25.02.19 09:57, Jakub Jelen wrote: > On Sun, 2019-02-24 at 18:38 +0100, g4-l...@tonarchiv.ch wrote: >> ... which IMHO does not make much sense: >> >> #define OPENSSH_HEADER_BEGIN "-BEGIN OPENSSH PRIVATE KEY-" >> >> So if we import a public key this code block will never be used: >> >>

Re: Issues with channel callbacks

2019-02-25 Thread g4-lisz
On 25.02.19 11:18, Tilo Eckert wrote: > 3) My data callback is executed exactly once for every received channel > data packet. I think this should be changed to be more user-friendly: > The data callback should be executed repeatedly until it consumed all > available bytes or 0 (i.e. the callback

Issues with channel callbacks

2019-02-25 Thread Tilo Eckert
Hi, I am experimenting with the ssh_event/connector APIs to remotely execute commands and process the returned output via callbacks (to retain the order of stdin and stderr messages as sent by the server). I used the shell() and select_loop() functions from the ssh_client.c example as a starting p

Re: Implementation of Encrypt-then-MAC modes

2019-02-25 Thread Andreas Schneider
On Wednesday, February 20, 2019 11:18:14 AM CET Dirkjan Bussink wrote: > Hi all, Hi Dirkjan, > Attached to this email is a series of patches that implements > Encrypt-then-MAC modes to LibSSH of the existing MACs, hmac-sha1, > hmac-sha2-256, hmac-sha2-512 & hmac-md5. > > This is tested and also

Re: ssh_pki_import_pubkey_file checks for OPENSSH_HEADER_BEGIN

2019-02-25 Thread Jakub Jelen
On Sun, 2019-02-24 at 18:38 +0100, g4-l...@tonarchiv.ch wrote: > ... which IMHO does not make much sense: > > #define OPENSSH_HEADER_BEGIN "-BEGIN OPENSSH PRIVATE KEY-" > > So if we import a public key this code block will never be used: > > /* Test for new OpenSSH key format first