Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More Auth Options #17

Merged
merged 2 commits into from
Oct 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions libssh-rs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,22 @@ impl Session {
name.as_ptr() as _,
)
},
SshOption::HmacCS(name) => unsafe {
let name = CString::new(name)?;
sys::ssh_options_set(
**sess,
sys::ssh_options_e::SSH_OPTIONS_HMAC_C_S,
name.as_ptr() as _,
)
},
SshOption::HmacSC(name) => unsafe {
let name = CString::new(name)?;
sys::ssh_options_set(
**sess,
sys::ssh_options_e::SSH_OPTIONS_HMAC_S_C,
name.as_ptr() as _,
)
},
SshOption::ProcessConfig(value) => unsafe {
let value: c_uint = value.into();
sys::ssh_options_set(
Expand Down Expand Up @@ -1345,6 +1361,10 @@ pub enum SshOption {
CiphersCS(String),
///Set the symmetric cipher server to client as a comma-separated list.
CiphersSC(String),
/// Set the MAC algorithm client to server as a comma-separated list.
HmacCS(String),
/// Set the MAC algorithm server to client as a comma-separated list.
HmacSC(String),
/// Set it to false to disable automatic processing of per-user and system-wide OpenSSH configuration files.
ProcessConfig(bool),
/// Set the global known hosts file name
Expand Down