Age | Commit message (Collapse) | Author |
|
Add documentation on where to find async compatibile versions of ssh2-rs
|
|
|
|
the transfer to finish. Add Netconf example
Signed-off-by: Bigo <bigo@crisidev.org>
|
|
|
|
|
|
Resolves #195 (use after free, double free, segfault...)
|
|
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.
|
|
refs: https://github.com/alexcrichton/ssh2-rs/issues/187
refs: https://github.com/alexcrichton/ssh2-rs/issues/191
|
|
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
|
|
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.
|
|
|
|
Signed-off-by: Bigo <bigo@crisidev.org>
|
|
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
|
|
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
|
|
|
|
|
|
set in env
|
|
|
|
This method enables agent forwarding
|
|
|
|
|
|
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>`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and not the last sftp error. Confusing!
|
|
@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.
|
|
This allows Channel and Stream to be Send
|
|
Heh, I removed this by accident at the last minute before submitting
the PR to the CI... restore it!
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
They've been present in `Cargo.toml` forever, add dedicated files as
well
|
|
|
|
|