summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-07-16Merge pull request #224 from emesterhazy/etm/async-adviceHEADmasterMatteo Bigoi
Revert "Add documentation on where to find async compatible versions…
2021-07-15Revert "Add documentation on where to find async compatibile versions of ↵Evan Mesterhazy
ssh2-rs" This reverts commit 0d316d2f734a4ee03523f6001f5a1a4bb7535bc9. As of this commit, https://crates.io/crates/async-ssh2/0.1.2-beta is listed as deprecated on crates.io. I believe that the other alternative mentioned in the reverted commit, async-ssh2-lite, has at least two serious correctness issues and should not be recommended: 1. https://github.com/bk-rs/async-ssh2-lite/issues/9 2. https://github.com/bk-rs/async-ssh2-lite/issues/10 async-ssh2-lite is also lacking documentation and has no unit or integration tests to give confidence in its implementation. In my opinion, until such issues are resolved ssh2 should refrain from recommending either of these crates to avoid misleading users into believing that these implementations are tested and ready for production.
2021-03-09Update libssh2-sys to 0.2.21 in ssh2 dependencies (#210)Akira Moroo
* Update libssh2-sys to 0.2.21 in ssh2 dependencies * Update parking_lot to 0.11 Signed-off-by: Akira Moroo <retrage01@gmail.com>
2021-02-01Prepare ssh2 0.9.1 and libssh2-sys 0.2.21 releaseMatteo Bigoi
2021-02-01Expose libssh2_trace function (#209)Mike Harris
* Expose libssh2_trace function and associated constants, to allow enabling libssh2 trace output. * set LIBSSH2_WIN32 on windows build so that gettimeofday replacement will be compiled. * libssh2_trace actually returns int, even though the documentation says it returns void. This was causing systest to fail. Changed the FFI to match the C function. Co-authored-by: eharmic <michael.harris@ericsson.com>
2020-11-22Update libssh2 submodule to track back from ↵Matteo Bigoi
https://github.com/libssh2/libssh2 (#205) * Update libssh2 submodule to track back from https://github.com/libssh2/libssh2 * Update sys crate to track latest change from https://github.com/libssh2/libssh2
2020-11-22Handle more precise SFTP error codes (#203)Matteo Bigoi
* Handle more precise SFTP error codes * Allow set-env in macos github action * Bump to 0.9 since the Error interface has changed, hence this is a breaking change
2020-11-22Merge pull request #204 from crisidev/async_docMatteo Bigoi
Add documentation on where to find async compatibile versions of ssh2-rs
2020-11-22Add documentation on where to find async compatibile versions of ssh2-rsBigo
2020-11-16Update documentation to ensure sending and receiving files via SCP wait for ↵Matteo Bigoi
the transfer to finish. Add Netconf example Signed-off-by: Bigo <bigo@crisidev.org>
2020-11-14bump version to prep for a releaseWez Furlong
2020-11-14Typo in channel docsAndrew Burkett
2020-11-14Fix broken drop impl in SFTP moduleThomas BESSOU
Resolves #195 (use after free, double free, segfault...)
2020-08-18libssh2-sys: Add support for zlib-ng (#197)Josh Triplett
Update to libz-sys 1.1.0, which supports zlib-ng. Provide a feature zlib-ng-compat to allow building with zlib-ng. Since doing so statically links zlib-ng, ensure that this feature prevents using a system libssh2.
2020-06-29gersion bump to reflect bundled libssh2 changeWez Furlong
refs: https://github.com/alexcrichton/ssh2-rs/issues/187 refs: https://github.com/alexcrichton/ssh2-rs/issues/191
2020-06-29libssh2: update submoduleWez Furlong
This points to a copy of https://github.com/libssh2/libssh2/pull/484 that I stashed in my fork. We'll keep pointing to this until the feature is merged and once it is released we can retire my fork. refs: https://github.com/alexcrichton/ssh2-rs/issues/187 refs: https://github.com/wez/libssh2/pull/2 refs: https://github.com/alexcrichton/ssh2-rs/issues/191
2020-05-25drop nightly rust from CI buildsWez Furlong
The systest tests depend, via the unmaintained syntex crate, on extprim which uses legacy asm! syntax. This commit should make the CI green again, but we may want to consider dropping the systest tests from this repo to avoid more busywork in the future.
2020-05-02bump version to pick up some bug fixesWez Furlong
2020-05-02Remove assertion during SFTP Drop to avoid an uncatchable panic. Closes: #180Bigo
Signed-off-by: Bigo <bigo@crisidev.org>
2020-04-26revert #170Wez Furlong
This caused fairly widespread problems and it seems that the original issue that led to this change (https://github.com/rust-lang/rust/issues/69552) should really be fixed by better defining the data exported from eg: libz-sys rather than having downstream crates replicating the same logic from inside that crate. refs: https://github.com/alexcrichton/ssh2-rs/issues/174 refs: https://github.com/alexcrichton/ssh2-rs/pull/170 refs: https://github.com/alexcrichton/ssh2-rs/issues/169 refs: https://github.com/rust-lang/rust/issues/69552
2020-04-25build: Announce environment variable usage to Cargochrysn
This was primarily done to address issues from changing LIBSSH_SYS_USE_PKG_CONFIG, but it's good build script practice to let Cargo know of every used environment variable. Closes: https://github.com/alexcrichton/ssh2-rs/issues/171
2020-04-25vcpkg: Support openssl 1.1 linkageoblique
2020-03-04bump version number to release fix for #169Wez Furlong
2020-03-04attempt to use pkg-config to get include path for zlib and openssl if not ↵Mark Karpeles
set in env
2020-02-22update readme for latest versionWez Furlong
2020-02-22Add Channel::request_auth_agent_forwardingWez Furlong
This method enables agent forwarding
2020-02-08Update for revised win10 DH fixWez Furlong
2020-02-07Fixed misspellingvallentin
2020-01-29copy the error message obtained in last_errorYusuke Sasaki
The pointer obtained by `libssh2_session_last_error` points to the buffer that `LIBSSH2_SESSION` holds internally, so its contents may be overwritten by the next API call. This patch changes the data type for storing error messages inside `Error` from `&'static str` to `Cow<'static, str>`.
2020-01-26replace tcp stream accessor with std traits to obtain raw fdsbold
2020-01-26allow different tcp streamsbold
2020-01-25bump version numberWez Furlong
2020-01-25Update libssh2-sys version in dependenciesHiroki Noda
2020-01-22add note about Session, Send, Sync, Clone and concurrencyWez Furlong
2020-01-22Agent, Sftp and File are now Send + SyncWez Furlong
2020-01-19sftp_open yields errors via the session last errorWez Furlong
and not the last sftp error. Confusing!
2020-01-18make Listener Send + SyncWez Furlong
@richardwhiuk requested this. While it is safe to move to another thread, it will still lock internally, and if you are in blocking mode that may be undesirable.
2020-01-18ChannelInner is Send + SyncWez Furlong
This allows Channel and Stream to be Send
2020-01-18Restore deleted Send implWez Furlong
Heh, I removed this by accident at the last minute before submitting the PR to the CI... restore it!
2020-01-18remove now-unused Binding traitWez Furlong
2020-01-18Make properly Send safeWez Furlong
In earlier iterations I accidentally removed Send from Session and then later restored it in an unsafe way. This commit restructures the bindings so that each of the objects holds a reference to the appropriate thing to keep everything alive safely, without awkward lifetimes to deal with. The key to this is that the underlying Session is tracked by an Arc<Mutex<>>, with the related objects ensuring that they lock this before they call into the underlying API. In order to make this work, I've had to adjust the API around iterating both known hosts and agent identities: previously these would iterate over internal references but with this shift there isn't a reasonable way to make that safe. The strategy is instead to return a copy of the host/identity data and then later look up the associated raw pointer when needed. The purist in me feels that the copy feels slightly wasteful, but the realist justifies this with the observation that the cardinality of both known hosts and identities is typically small enough that the cost of this is in the noise compared to actually doing the crypto+network ops. I've removed a couple of error code related helpers from some of the objects: those were really internal APIs and were redundant with methods exported by the Error type anyway. Fixes: https://github.com/alexcrichton/ssh2-rs/issues/154 Refs: https://github.com/alexcrichton/ssh2-rs/issues/137
2020-01-18rename unwrap_inner_or_err to get_innerbold
2020-01-18rename unwrap_raw_or_err to get_rawbold
2020-01-18simplify function signaturebold
2020-01-18eliminate conditionals when enforce blocking in destructorsbold
2020-01-18use take instead of as_refbold
2020-01-18set ssh2 to blocking when dropping sftp and filebold
2020-01-18make set_blocking and is_blocking available for inner sessionbold
2020-01-18add shutdown and close methodsbold
This commit exposes the `shutdown` method of `Sft` and `close` method of `File` to free resources. Previously this was done synchronously and therefor not usable in async wrappers. Whith the methods exposed they can be polled until success. If successful a flag is set to notify the destructor that no resources need to be freed anymore. However, if resources were not cleaned up by calling `close` or `shutdown` the destructor will clean up synchronously.
2020-01-18derive clone for sessionbold