summaryrefslogtreecommitdiff
path: root/lib/vssh
Commit message (Collapse)AuthorAgeFilesLines
* libssh2: convert over to use dynbufDaniel Stenberg2020-05-052-78/+56
| | | | | | | | In my very basic test that lists sftp://127.0.0.1/tmp/, this patched code makes 161 allocations compared to 194 in git master. A 17% reduction. Closes #5336
* libssh2: set the expected total size in SCP upload initDaniel Stenberg2020-05-021-1/+3
| | | | | | | | | ... as otherwise the progress callback gets called without that information, making the progress meter have less info. Reported-by: Murugan Balraj Bug: https://curl.haxx.se/mail/archive-2020-05/0000.html Closes #5317
* libssh: avoid options override by configuration filesAnderson Toshiyuki Sasaki2020-04-251-14/+47
| | | | | | | | | | | | | | | Previously, options set explicitly through command line options could be overridden by the configuration files parsed automatically when ssh_connect() was called. By calling ssh_options_parse_config() explicitly, the configuration files are parsed before setting the options, avoiding the options override. Once the configuration files are parsed, the automatic configuration parsing is not executed. Fixes #4972 Closes #5283 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
* libssh: Use new ECDSA key types to check known hostsAnderson Toshiyuki Sasaki2020-04-171-0/+8
| | | | | | | | | From libssh 0.9.0, ssh_key_type() returns different key types for ECDSA keys depending on the curve. Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Fixes #5252 Closes #5253
* sftp: fix segfault regression introduced by #4747Jim Fuller2020-03-091-16/+25
| | | | | | | | This fix adds a defensive check for the case where the char *name in struct libssh2_knownhost is NULL Fixes #5041 Closes #5062
* libssh: Fix matching user-specified MD5 hex keyJay Satiro2020-03-071-3/+17
| | | | | | | | | | | Prior to this change a match would never be successful because it was mistakenly coded to compare binary data from libssh to a user-specified hex string (ie CURLOPT_SSH_HOST_PUBLIC_KEY_MD5). Reported-by: fds242@users.noreply.github.com Fixes https://github.com/curl/curl/issues/4971 Closes https://github.com/curl/curl/pull/4974
* libssh: improve known hosts handlingAnderson Toshiyuki Sasaki2020-02-271-6/+92
| | | | | | | | | | | | | | | | Previously, it was not possible to get a known hosts file entry due to the lack of an API. ssh_session_get_known_hosts_entry(), introduced in libssh-0.9.0, allows libcurl to obtain such information and behave the same as when compiled with libssh2. This also tries to avoid the usage of deprecated functions when the replacements are available. The behaviour will not change if versions older than libssh-0.8.0 are used. Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Fixes #4953 Closes #4962
* cleanup: comment typosDaniel Stenberg2020-02-212-3/+1
| | | | | | Spotted by 'codespell' Closes #4957
* wolfssh: make it init properly via Curl_ssh_init()Daniel Stenberg2020-01-241-0/+5
| | | | Closes #4846
* libssh2: fix variable typeMarcel Raad2020-01-161-1/+1
| | | | | | | This led to a conversion warning on 64-bit MinGW, which has 32-bit `long` but 64-bit `size_t`. Closes https://github.com/curl/curl/pull/4823
* wolfssh: set the password correctly for PASSWORD authDaniel Stenberg2020-01-151-3/+4
|
* wolfssh: remove fprintf() calls (and uses of __func__)Daniel Stenberg2020-01-151-4/+4
|
* wolfSSH: new SSH backendDaniel Stenberg2020-01-123-7/+1192
| | | | | | Adds support for SFTP (not SCP) using WolfSSH. Closes #4231
* misc: Copyright year out of date, should be 2020Daniel Stenberg2020-01-121-1/+1
| | | | | | Follow-up to recent commits [skip ci]
* libssh2: add support for forcing a hostkey typeSantino Keupp2020-01-111-0/+130
| | | | | | | | | | | | - Allow forcing the host's key type found in the known_hosts file. Currently, curl (with libssh2) does not take keys from your known_hosts file into account when talking to a server. With this patch the known_hosts file will be searched for an entry matching the hostname and, if found, libssh2 will be told to claim this key type from the server. Closes https://github.com/curl/curl/pull/4747
* lib: remove ASSIGNWITHINCONDITION exceptions, use our code styleDaniel Stenberg2019-12-171-3/+7
| | | | | | | | | | ... even for macros Reviewed-by: Daniel Gustafsson Reviewed-by: Jay Satiro Reported-by: Jay Satiro Fixes #4683 Closes #4722
* Revert "checksrc: fix regexp for ASSIGNWITHINCONDITION"Daniel Stenberg2019-12-161-0/+1
| | | | | | This reverts commit ba82673dac3e8d00a76aa5e3779a0cb80e7442af. Bug: #4683
* libssh2: add support for ECDSA and ed25519 knownhost keysSantino Keupp2019-12-151-47/+81
| | | | | | | | ... if a new enough libssh2 version is present. Source: https://curl.haxx.se/mail/archive-2019-12/0023.html Co-Authored-by: Daniel Stenberg Closes #4714
* build: Disable Visual Studio warning "conditional expression is constant"Jay Satiro2019-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Disable warning C4127 "conditional expression is constant" globally in curl_setup.h for when building with Microsoft's compiler. This mainly affects building with the Visual Studio project files found in the projects dir. Prior to this change the cmake and winbuild build systems already disabled 4127 globally for when building with Microsoft's compiler. Also, 4127 was already disabled for all build systems in the limited circumstance of the WHILE_FALSE macro which disabled the warning specifically for while(0). This commit removes the WHILE_FALSE macro and all other cruft in favor of disabling globally in curl_setup. Background: We have various macros that cause 0 or 1 to be evaluated, which would cause warning C4127 in Visual Studio. For example this causes it: #define Curl_resolver_asynch() 1 Full behavior is not clearly defined and inconsistent across versions. However it is documented that since VS 2015 Update 3 Microsoft has addressed this somewhat but not entirely, not warning on while(true) for example. Prior to this change some C4127 warnings occurred when I built with Visual Studio using the generated projects in the projects dir. Closes https://github.com/curl/curl/pull/4658
* curl_setup_once: consistently use WHILE_FALSE in macrosDaniel Gustafsson2019-11-281-1/+1
| | | | | | | | | The WHILE_FALSE construction is used to avoid compiler warnings in macro constructions. This fixes a few instances where it was not used in order to keep the code consistent. Closes #4649 Reviewed-by: Daniel Stenberg <daniel@haxx.se>
* checksrc: fix regexp for ASSIGNWITHINCONDITIONDaniel Gustafsson2019-11-281-1/+0
| | | | | | | | | | | | | | | | | | | | | The regexp looking for assignments within conditions was too greedy and matched a too long string in the case of multiple conditionals on the same line. This is basically only a problem in single line macros, and the code which exemplified this was essentially: do { if((x) != NULL) { x = NULL; } } while(0) ..where the final parenthesis of while(0) matched the regexp, and the legal assignment in the block triggered the warning. Fix by making the regexp less greedy by matching for the tell-tale signs of the if statement ending. Also remove the one occurrence where the warning was disabled due to a construction like the above, where the warning didn't apply when fixed. Closes #4647 Reviewed-by: Daniel Stenberg <daniel@haxx.se>
* lib: Move lib/ssh.h -> lib/vssh/ssh.hJay Satiro2019-11-171-0/+254
| | | | | | Follow-up to 5b2d703 which moved ssh source files to vssh. Closes https://github.com/curl/curl/pull/4609
* lib: silence conversion warningsMarcel Raad2019-10-011-1/+1
| | | | Closes https://github.com/curl/curl/pull/4444
* libssh: part of conditional expression is always true: !resultDaniel Stenberg2019-09-231-1/+1
| | | | | PVS-Studio warning Fixed #4402
* libssh: part of conditional expression is always trueDaniel Stenberg2019-09-231-1/+1
| | | | | PVS-Studio warning Fixes #4402
* libssh: The expression is excessive or contains a misprintDaniel Stenberg2019-09-231-1/+1
| | | | | PVS-Studio warning Fixes #4402
* libssh2: part of conditional expression is always true: !resultDaniel Stenberg2019-09-201-1/+1
| | | | | Fixes warning detected by PVS-Studio Fixes #4374
* ssh: add a generic Curl_ssh_version function for SSH backendsDaniel Stenberg2019-08-172-0/+9
| | | | Closes #4235
* vssh: move ssh init/cleanup functions into backend codeDaniel Stenberg2019-08-172-0/+32
|
* vssh: create directory for SSH backend codeDaniel Stenberg2019-08-172-0/+6052