aboutsummaryrefslogtreecommitdiff
path: root/lib/ssh.c
AgeCommit message (Collapse)Author
2008-03-04Mike Protts brought a patch that makes resumed transfers work with SFTP.Daniel Stenberg
2008-02-19fix compiler warnings: 'statement is unreachable'Yang Tse
2008-02-19fix compiler warnings: 'enumerated type mixed with another type'Yang Tse
2008-02-18fix compiler warnings:Yang Tse
'enumerated type mixed with another type' and 'variable was set but never used'
2008-02-15log SSH public key authentication failure and reasonYang Tse
2008-01-22when unable to initialize sftp session, also log failure reasonYang Tse
2008-01-15Calls to Curl_failf() are not supposed to provide a trailing newline as theDaniel Stenberg
function itself adds that. Fixed on 50 or something strings!
2007-11-29include the libssh2 return code in the output for these failures to easeDaniel Stenberg
debugging
2007-11-24struct HandleData is now called struct SingleRequest, and is only for data thatDaniel Stenberg
is inited at the start of the DO action. I removed the Curl_transfer_keeper struct completely, and I had to move out a few struct members (that had to be set before DO or used after DONE) to the UrlState struct. The SingleRequest struct is accessed with SessionHandle->req. One of the biggest reasons for doing this was the bunch of duplicate struct members in HandleData and Curl_transfer_keeper since it was really messy to keep track of two variables with the same name and basically the same purpose!
2007-11-12Fixed a remaining problem with doing SFTP directory listings on a re-usedDaniel Stenberg
persistent connection. Mentioned by Immanuel Gregoire on the mailing list.
2007-11-12oops, fixed build when CURL_LIBSSH2_DEBUG is definedDaniel Stenberg
2007-11-08Fix compiler warning: may be used uninitializedYang Tse
2007-11-08Bug report #1823487 (http://curl.haxx.se/bug/view.cgi?id=1823487) pointedDaniel Stenberg
out that SFTP requests didn't use persistent connections. Neither did SCP ones. I gave the SSH code a good beating and now both SCP and SFTP should use persistent connections fine. I also did a bunch for indent changes as well as a bug fix for the "keyboard interactive" auth.
2007-11-07if () => if()Daniel Stenberg
while () => while() and some other minor re-indentings
2007-11-05Move connection-oriented variables from the SessionHandle struct to theDaniel Stenberg
connectdata struct. This will in theory enable us to do persistent connections with SCP+SFTP, but currently the state machine always (and wrongly) cleanup everything in the 'done' action instead of in 'disconnect'. Also did a bunch of indent fixes, if () => if() and a few other source cleanups like added comments etc.
2007-10-22Michal Marek forwarded the bug reportDaniel Stenberg
https://bugzilla.novell.com/show_bug.cgi?id=332917 about a HTTP redirect to FTP that caused memory havoc. His work together with my efforts created two fixes: #1 - FTP::file was moved to struct ftp_conn, because is has to be dealt with at connection cleanup, at which time the struct HandleData could be used by another connection. Also, the unused char *urlpath member is removed from struct FTP. #2 - provide a Curl_reset_reqproto() function that frees data->reqdata.proto.* on connection setup if needed (that is if the SessionHandle was used by a different connection).
2007-10-17We use this ZERO_NULL to avoid picky compiler warnings,Yang Tse
when assigning a NULL pointer to a function pointer var.
2007-10-12Added per-protocol callback static tables, replacing callback ptr storagePatrick Monnerat
in the connectdata structure by a single handler table ptr.
2007-10-03I renamed the CURLE_SSL_PEER_CERTIFICATE error code toDaniel Stenberg
CURLE_PEER_FAILED_VERIFICATION (standard CURL_NO_OLDIES style), and made this return code get used by the previous SSH MD5 fingerprint check in case it fails.
2007-10-03Based on a patch brought by Johnny Luong, libcurl now offersDaniel Stenberg
CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 and the curl tool --hostpubmd5. They both make the SCP or SFTP connection verify the remote host's md5 checksum of the public key before doing a connect, to reduce the risk of a man-in-the-middle attack.
2007-09-29Immanuel Gregoire fixed a problem with persistent transfers over SFTP - theDaniel Stenberg
previous proto struct was kept.
2007-09-28rename variable to prevent shadow warningDaniel Stenberg
2007-09-18Immanuel pointed out that public key SSH auth failed if no public/privateDaniel Stenberg
key was specified and there was no HOME environment variable, and then it didn't continue to try the other auth methods. Now it will instead try to get the files id_dsa.pub and id_dsa from the current directory if none of the two conditions were met.
2007-08-30Added more accurate error code returns from SFTP operations. Added testDan Fandrich
case 615 to test an SFTP upload failure.
2007-08-30Renamed several libcurl error codes and options to make them more generalDan Fandrich
and allow reuse by multiple protocols. Several unused error codes were removed. In all cases, macros were added to preserve source (and binary) compatibility with the old names. These macros are subject to removal at a future date, but probably not before 2009. An application can be tested to see if it is using any obsolete code by compiling it with the CURL_NO_OLDIES macro defined. Documented some newer error codes in libcurl-error(3)
2007-08-03Start adding some expanded error conversion of libssh2 errors.James Housley
2007-08-03remove left-over partly support for libssh2 0.14Daniel Stenberg
2007-08-03The SSH code now only works with libssh2 0.16 or later. Thus we must notDaniel Stenberg
release the next curl until there is a libssh2 0.16 released.
2007-08-01Patrick Monnerat and I modified libcurl so that now it *copies* all stringsDaniel Stenberg
passed to it with curl_easy_setopt()! Previously it has always just refered to the data, forcing the user to keep the data around until libcurl is done with it. That is now history and libcurl will instead clone the given strings and keep private copies.
2007-07-21Make the pointers of a few static const arrays const, too, for safety.Dan Fandrich
2007-07-20Fix a loop with PWDJames Housley
2007-07-20Made some const arrays static to avoid unnecessary stack usage.Dan Fandrich
2007-07-18As has been pointed out, err_msg should not be freed here. The actualJames Housley
issue is in libssh2 and not freeing a dynamic error message during cleanup.
2007-07-14for now unless we do better fixed LIBSSH2_APINO compares to use long constants.Gunter Knauf
2007-07-10* Finish moving sftp:// into a state machine so it won't block in multi modeJames Housley
* Move scp:// into a state machine so it won't block in multi mode * When available use the full directory entry from the sftp:// server
2007-07-05Gavrie Philipson provided a patch that will use a more specific errorJames Housley
message for an scp:// upload failure. If libssh2 has his matching patch, then the error message return by the server will be used instead of a more generic error.
2007-07-04Fix spelling error in error messageJames Housley
2007-06-27Add two new options for the SFTP/SCP/FILE protocols: CURLOPT_NEW_FILE_PERMSJames Housley
and CURLOPT_NEW_DIRECTORY_PERMS. These control the premissions for files and directories created on the remote server. CURLOPT_NEW_FILE_PERMS defaults to 0644 and CURLOPT_NEW_DIRECTORY_PERMS defaults to 0755
2007-06-27removed trailing spaces.Gunter Knauf
2007-06-27fixed wrong var nameGunter Knauf
2007-06-26The results for a list only directory should be sent to the callbackJames Housley
2007-06-26ftp_list_only mode should list all file types, not just directories.James Housley
2007-06-20If the creation of rsa and rsa_pub fail due to memory, don't tryJames Housley
other authentication methods. Terminate with a memory error.
2007-06-19Check both variables, not the same one twice. Pointed out by Colin HogbenJames Housley
2007-06-19extra precaution to make PATH_MAX always be definedDaniel Stenberg
2007-06-19Change rsa and rsa_pub from static arrays in ssh_conn to be dynamicallyJames Housley
allocated when needed
2007-06-18If LIBSSH2DEBUG was defined "i" was undefinedJames Housley
2007-06-16Curl_ssh_connect() was using an uninitialized variable in one location.James Housley
Caught by the auto-builds
2007-06-14Remove duplicate code that was left in as part of 1.35. This codeJames Housley
only affected sftp_sendquote() for the "chgrp/chmod/chown" commands. This also fixed failure of test 614 on a system that previously failed.
2007-06-14BUG FIX: When reading a directory listing that contains symlinksJames Housley
with the latest libssh2, the listing would be truncated at the symlink. Fix by looping on LIBSSH2_ERROR_EAGAIN, like the rest of the calls.