Skip to content

Commit

Permalink
Add constants supporting RFC8332
Browse files Browse the repository at this point in the history
  • Loading branch information
yodaldevoid committed Sep 20, 2022
1 parent a0ec57e commit 6f6aa15
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libssh2-sys/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ pub const LIBSSH2_METHOD_COMP_CS: c_int = 6;
pub const LIBSSH2_METHOD_COMP_SC: c_int = 7;
pub const LIBSSH2_METHOD_LANG_CS: c_int = 8;
pub const LIBSSH2_METHOD_LANG_SC: c_int = 9;
pub const LIBSSH2_METHOD_SIGN_ALGO: c_int = 10;

pub const LIBSSH2_CHANNEL_PACKET_DEFAULT: c_uint = 32768;
pub const LIBSSH2_CHANNEL_WINDOW_DEFAULT: c_uint = 2 * 1024 * 1024;
Expand Down Expand Up @@ -102,6 +103,7 @@ pub const LIBSSH2_ERROR_CHANNEL_WINDOW_FULL: c_int = -47;
pub const LIBSSH2_ERROR_KEYFILE_AUTH_FAILED: c_int = -48;
pub const LIBSSH2_ERROR_RANDGEN: c_int = -49;
pub const LIBSSH2_ERROR_MISSING_USERAUTH_BANNER: c_int = -50;
pub const LIBSSH2_ERROR_ALGO_UNSUPPORTED: c_int = -51;

pub const LIBSSH2_FX_EOF: c_int = 1;
pub const LIBSSH2_FX_NO_SUCH_FILE: c_int = 2;
Expand Down
1 change: 1 addition & 0 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ impl Error {
raw::LIBSSH2_ERROR_KEYFILE_AUTH_FAILED => "keyfile auth failed",
raw::LIBSSH2_ERROR_RANDGEN => "unable to get random bytes",
raw::LIBSSH2_ERROR_MISSING_USERAUTH_BANNER => "missing userauth banner",
raw::LIBSSH2_ERROR_ALGO_UNSUPPORTED => "algorithm unsupported",
_ => "unknown error",
},
ErrorCode::SFTP(code) => match code {
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ pub enum MethodType {
CompSc = raw::LIBSSH2_METHOD_COMP_SC as isize,
LangCs = raw::LIBSSH2_METHOD_LANG_CS as isize,
LangSc = raw::LIBSSH2_METHOD_LANG_SC as isize,
SignAlgo = raw::LIBSSH2_METHOD_SIGN_ALGO as isize,
}

/// When passed to `Channel::flush_stream`, flushes all extended data
Expand Down

0 comments on commit 6f6aa15

Please sign in to comment.