Age | Commit message (Collapse) | Author |
|
|
|
hopefully this will make the i686 build a little happier on appveyor
|
|
|
|
This fixes the CI build with nightly, as we have deny(warnings)
enabled.
|
|
Since it's unclear when this fix will be reviewed upstream, let's make
a branch that can be pointed to the fix in the meantime.
Refs https://github.com/alexcrichton/ssh2-rs/issues/122
|
|
Refs: https://github.com/alexcrichton/ssh2-rs/issues/112
|
|
This commit builds with the msvc toolchain on 64- and 32-bit versions of windows 2016 and 2019 based images
|
|
Previously, this function could return None even if passed an error
result. This could happen in situations where no error had been
recorded against the session object, but where libssh2 had returned
an error condition anyway.
It was also possible for the prior implementation to return the
wrong information in a similar situation: if an error had been
recorded against the session, that error would be returned rather
than the current error code.
This commit tidies up the implementation of this function by
always returning an `Error` object that corresponds to the
provided `rc` parameter. If the last error message recorded
against the `Session` has a matching error value then that
error message will be used, otherwise we'll synthesize one
just from the error code.
|
|
|
|
Debugging a test failure/hang on travis for macos
|
|
Add a function to configure how extended data streams are
to be handled. This allows for merging stderr to stdout, or
discarding it.
|
|
There's not a lot we can do about it.
|
|
This avoids the potential for UB if the callback panics; Rust
doesn't specify what happens if a panic unwinds back into
C code.
|
|
|
|
I took pains to not stage it, but git added it anyway...
This should put us back on the original hash for now.
|
|
The recent move to take ownership of TcpStream exposed an issue with
the `handshake` method: if the stream is non-blocking then it may
take several attempts to handshake, but only the first one is able
to transfer ownership.
My initial thought was just to make the TcpStream a required parameter
to `new`, but we have some tests that work with known hosts and the
ssh agent that don't require a tcpstream.
I'm going to review those and see if there is a cleaner overall
solution, but that will likely require more substantial API changes.
For now, the simplest change is to add a separate `set_tcp_stream`
function to make the stream ownership transfer explicit and distinct
from the handshake.
Refs: https://github.com/alexcrichton/ssh2-rs/issues/17
|
|
This makes it safer to accidentally return more than the requested
number of responses from the prompt callback.
Refs: https://github.com/alexcrichton/ssh2-rs/issues/65
|
|
Increase the level of diagnostics in the hope that we learn
more about what's happening with the failure on travis:
https://travis-ci.com/alexcrichton/ssh2-rs/jobs/221391881
|
|
Refs: https://github.com/alexcrichton/ssh2-rs/issues/65
|
|
* Adopt scp_recv2 instead, which uses compatible 64-bit stat types
* Mark scp_recv as deprecated
* small version bump
Fixes https://github.com/alexcrichton/ssh2-rs/issues/109
Refs https://github.com/alexcrichton/ssh2-rs/pull/117
Co-authored-by: Joyce Babu <joyce@ennexa.com>
|
|
I'm hitting a kex protocol error when talking from windows->ubuntu 19
and that wasn't getting reported as an error on the client side
because the `rc` function only emits an error if one has been recorded
against the session object, despite being reported via the parameter.
I think it's worth revisiting this more broadly, but for now, let's
report this error in the handshake case.
|
|
|
|
Closes https://github.com/alexcrichton/ssh2-rs/issues/119
|
|
This makes it possible to run the integration tests without
requiring that the user change their local ssh configuration.
This is desirable because some sites have strict controls over
the local ssh configuration files.
This commit adds a script that spawns a local copy of the ssh
daemon running on an alternate port with a specific configuration
that is known to successfully pass the test suite.
This has only been tested on my local macos machine so far.
|
|
At the start of feb 2019 the tests started to fail on macos on Travis. No
changes were made to the repo, so the problem must be environmental.
It turns out that the server was emitting stderr output, and since the
tests were not consuming stderr, this made `channel.eof()` always
return false.
The resolution is to drain both stdout and stderr in the tests before
making assertions with `channel.eof()`.
I've also updated the doc comment on `channel.eof()` to reflect this,
as it is a bit of a sharp edge.
|
|
|
|
When the channel is set to non-blocking mode, take care to map the
underlying ssh2 error code to the WouldBlock error kind so that
embedding applications can correctly handle that situation.
|
|
`cargo test --all` (which only appears safe to run in the CI
environment) doesn't get as far as `cargo test --doc` so I overlooked
these.
|
|
* Ignore vim swap files
* More tightly constrain cargo related ignores to top level
|
|
This is an alternative take on addressing this issue:
Refs: https://github.com/alexcrichton/ssh2-rs/pull/104
|
|
I'd gradually removed the usage of it while I was hacking through
with my lifetime changes. I suppose it could be added back
but I confess that I removed it because I found it confusing
and it didn't look like it would fit on my first pass through
the code.
|
|
|
|
|
|
Instead the internal session is kept alive via Rc
Refs: https://github.com/alexcrichton/ssh2-rs/issues/53
|
|
Refs: https://github.com/alexcrichton/ssh2-rs/issues/17
|
|
Refs: https://github.com/alexcrichton/ssh2-rs/issues/96
This is a breaking change, so bump the package version
|
|
No functional changes, just formatting
|
|
This enables building `ssh2` and `libssh2-sys` with the
`vendored-openssl` feature, which in turn causes openssl to be built and
linked locally, and does not require that homebrew or some other
externally provided version of openssl be made available.
It does require a working C compiler, perl and make.
|
|
This brings us up to date with the current set of host key and known
host key enum variants so that we can parse and edit current known_hosts
files.
This also adds a convenience `From` impl that allows converting from
the host key type to a known hosts entry type.
|
|
Fixes #110
|
|
This change is required to compile session.c
|
|
|
|
|
|
When LIBSSH2_DH_GEX_NEW is not defined LIBSSH2 will use an old
diffie-hellman-group-exchange-sha1 syntax that has been removed from
newer versions of OpenSSH.
|
|
Also removes the reexported flags from the crate root, since they're now
assoc. consts and it would be a bit weird to reexport those.
(breaking change)
|
|
|
|
* Remove `cmake` dependency in favor of `cc`
This has been done in a few other projects and has made it lightyears easier to
compile native C code, so let's do it here!
More info at alexcrichton/curl-rust#225
|
|
|
|
I don't really want to futz with pkg-config, building on all platforms is a
nightmare.
|
|
|