Skip to content

Commit 38a5fa9

Browse files
authored
added HMAC_C_S and HMAC_S_C (#17)
1 parent 9e2a00d commit 38a5fa9

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

libssh-rs/src/lib.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,22 @@ impl Session {
655655
name.as_ptr() as _,
656656
)
657657
},
658+
SshOption::HmacCS(name) => unsafe {
659+
let name = CString::new(name)?;
660+
sys::ssh_options_set(
661+
**sess,
662+
sys::ssh_options_e::SSH_OPTIONS_HMAC_C_S,
663+
name.as_ptr() as _,
664+
)
665+
},
666+
SshOption::HmacSC(name) => unsafe {
667+
let name = CString::new(name)?;
668+
sys::ssh_options_set(
669+
**sess,
670+
sys::ssh_options_e::SSH_OPTIONS_HMAC_S_C,
671+
name.as_ptr() as _,
672+
)
673+
},
658674
SshOption::ProcessConfig(value) => unsafe {
659675
let value: c_uint = value.into();
660676
sys::ssh_options_set(
@@ -1345,6 +1361,10 @@ pub enum SshOption {
13451361
CiphersCS(String),
13461362
///Set the symmetric cipher server to client as a comma-separated list.
13471363
CiphersSC(String),
1364+
/// Set the MAC algorithm client to server as a comma-separated list.
1365+
HmacCS(String),
1366+
/// Set the MAC algorithm server to client as a comma-separated list.
1367+
HmacSC(String),
13481368
/// Set it to false to disable automatic processing of per-user and system-wide OpenSSH configuration files.
13491369
ProcessConfig(bool),
13501370
/// Set the global known hosts file name

0 commit comments

Comments
 (0)