- 19 Mar, 2018 2 commits
-
-
Use `git_buf_decode_percent` so that we can avoid allocating a temporary buffer.
Edward Thomson committed -
Steven King Jr committed
-
- 23 Oct, 2017 1 commit
-
-
Etienne Samson committed
-
- 20 Oct, 2017 1 commit
-
-
When trying to decode the private key it looks like LibSSH2 returns a LIBSSH2_ERROR_PUBLICKEY_UNVERIFIED when the passphrase is incorrect.
Curtis Vogt committed
-
- 03 Jul, 2017 1 commit
-
-
Next to including several files, our "common.h" header also declares various macros which are then used throughout the project. As such, we have to make sure to always include this file first in all implementation files. Otherwise, we might encounter problems or even silent behavioural differences due to macros or defines not being defined as they should be. So in fact, our header and implementation files should make sure to always include "common.h" first. This commit does so by establishing a common include pattern. Header files inside of "src" will now always include "common.h" as its first other file, separated by a newline from all the other includes to make it stand out as special. There are two cases for the implementation files. If they do have a matching header file, they will always include this one first, leading to "common.h" being transitively included as first file. If they do not have a matching header file, they instead include "common.h" as first file themselves. This fixes the outlined problems and will become our standard practice for header and source files inside of the "src/" from now on.
Patrick Steinhardt committed
-
- 02 May, 2017 2 commits
-
-
After calling `libssh2_init`, we need to clean up after the library by executing `libssh2_exit` as soon as we exit. Register a shutdown handler to do so which simply calls `libssh2_exit`. This fixes several memory leaks.
Patrick Steinhardt committed -
We unconditionally return success when initializing libssh2, regardless of whether `libgssh2_init` signals success or an error. Fix this by checking its return code.
Patrick Steinhardt committed
-
- 29 Dec, 2016 1 commit
-
-
Error messages should be sentence fragments, and therefore: 1. Should not begin with a capital letter, 2. Should not conclude with punctuation, and 3. Should not end a sentence and begin a new one
Edward Thomson committed
-
- 03 Mar, 2016 1 commit
-
-
We should have been doing this, but it initializes itself upon first use, which works as long as nobody's doing concurrent network operations. Initialize it on our init to make sure it's not getting initialized concurrently.
Carlos Martín Nieto committed
-
- 28 Dec, 2015 1 commit
-
-
Also moving var declarations to top of blocks to support bad old compilers
Chris Bargren committed
-
- 26 Dec, 2015 1 commit
-
-
Fix the possibility of returning successfully from ssh_stream_read() with *bytes_read < 0. This would occur if stdout channel read resulted in 0, and stderr channel read failed afterwards.
Michał Górny committed
-
- 22 Dec, 2015 1 commit
-
-
Chris Bargren committed
-
- 14 Aug, 2015 1 commit
-
-
added a single line of additional error reporting from libssh2 when failing to retrieve the list of authentication methods
Max Leske committed
-
- 03 Aug, 2015 1 commit
-
-
For such a path '/~/...' the leading '/' is stripped so the server will get a path starting with '~' and correctly handle it.
Simon committed
-
- 10 Jul, 2015 1 commit
-
-
Edward Thomson committed
-
- 09 Jun, 2015 1 commit
-
-
Let `ssh_stream_free()` take a NULL stream, as free functions should, and remove the check from the connection setup. The connection setup would not need the check anyhow, as we always have a stream by the time we reach this code.
Carlos Martín Nieto committed
-
- 02 Jun, 2015 1 commit
-
-
Marius Ungureanu committed
-
- 27 May, 2015 2 commits
-
-
The public key field is optional and as such can take NULL. Account for that and do not call strlen() on NULL values. Also assert() for non-NULL values of username & private key.
Michał Górny committed -
David Calavera committed
-
- 20 May, 2015 2 commits
-
-
This can be used by tools to show mesages about failing to communicate with the server. The error message in this case will often contain the server's error message, as far as it managed to send anything.
Carlos Martín Nieto committed -
When we fail to read from stdout, it's typically because the URL was wrong and the server process has sent some output over its stderr output. Read that output and set the error message to whatever we read from it.
Carlos Martín Nieto committed
-
- 18 Mar, 2015 1 commit
-
-
The smart transport has already take the payload param. For the sub transport a payload param is useful for the implementer.
Leo Yang committed
-
- 10 Dec, 2014 1 commit
-
-
Having an ssh stream would require extra work for stream capabilities we don't need anywhere else (oob auth and command execution) so for now let's move away from the gitno connection to use socket_stream. We can introduce an ssh stream interface if and as we need it.
Carlos Martín Nieto committed
-
- 27 Oct, 2014 2 commits
-
-
Edward Thomson committed
-
Edward Thomson committed
-
- 22 Sep, 2014 1 commit
-
-
Signed-off-by: Sven Strickroth <email@cs-ware.de>
Sven Strickroth committed
-
- 16 Sep, 2014 8 commits
-
-
The user may have the data hashed as MD5 or SHA-1, so we should provide both types for consumption.
Carlos Martín Nieto committed -
Instead of using the libssh2 defines, provide our own, which eases usage as we do not need to check whether libgit2 was built with libssh2 or not.
Carlos Martín Nieto committed -
Instead of spreading the data in function arguments, some of which aren't used for ssh and having a struct only for ssh, use a struct for both, using a common parent to pass to the callback.
Carlos Martín Nieto committed -
Returning 0 lets the certificate check succeed. An error code is bubbled up to the user.
Carlos Martín Nieto committed -
We know the host's key as soon as we connect, so we should perform the check as soon as we can, before we bother with the user's credentials.
Carlos Martín Nieto committed -
We should let the user decide whether to cancel the connection or not regardless of whether our checks have decided that the certificate is fine. We provide our own assessment to the callback to let the user fall back to our checks if they so desire.
Carlos Martín Nieto committed -
Instead of the parsed data, we can ask OpenSSL to give us the DER-encoded version of the certificate, which the user can then parse and validate.
Carlos Martín Nieto committed -
If the certificate validation fails (or always in the case of ssh), let the user decide whether to allow the connection. The data structure passed to the user is the native certificate information from the underlying implementation, namely OpenSSL or WinHTTP.
Carlos Martín Nieto committed
-
- 04 Sep, 2014 1 commit
-
-
When the call to the agent fails, we must retrieve the error message just after the function call, as other calls may overwrite it. As the agent authentication is the only one which has a teardown and there does not seem to be a way to get the error message from a stored error number, this tries to introduce some small changes to store the error from the agent. Clearing the error at the beginning of the loop lets us know whether the agent has already set the libgit2 error message and we should skip it, or if we should set it.
Carlos Martín Nieto committed
-
- 05 Aug, 2014 1 commit
-
-
Jacques Germishuys committed
-
- 16 Jul, 2014 1 commit
-
-
Vicent Marti committed
-
- 07 Jul, 2014 1 commit
-
-
git allows you to set which paths to use for the git server programs when connecting over ssh; and we want to provide something similar. We do this by providing a factory function which can be set as the remote's transport callback which will set the given paths upon creation.
Carlos Martín Nieto committed
-
- 03 Jul, 2014 1 commit
-
-
Jacques Germishuys committed
-
- 02 Jul, 2014 1 commit
-
-
When the stream writing function was written, it assume that libssh2_channel_write() would always write all of the data to the wire. This is only true for the first 32k of data, which it tries to fit into one ssh packet. Since it can perform short writes, call it in a loop like we do for send(), advancing the buffer offset.
Carlos Martín Nieto committed
-