mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-27 13:21:11 +03:00
Add options support for setting and getting HMAC algorithms
BUG: https://red.libssh.org/issues/91 Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
262c82ac06
commit
6c74d6f891
@@ -716,6 +716,26 @@ int ssh_options_set(ssh_session session, enum ssh_options_e type,
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
case SSH_OPTIONS_HMAC_C_S:
|
||||
v = value;
|
||||
if (v == NULL || v[0] == '\0') {
|
||||
ssh_set_error_invalid(session);
|
||||
return -1;
|
||||
} else {
|
||||
if (ssh_options_set_algo(session, SSH_MAC_C_S, v) < 0)
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
case SSH_OPTIONS_HMAC_S_C:
|
||||
v = value;
|
||||
if (v == NULL || v[0] == '\0') {
|
||||
ssh_set_error_invalid(session);
|
||||
return -1;
|
||||
} else {
|
||||
if (ssh_options_set_algo(session, SSH_MAC_S_C, v) < 0)
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
case SSH_OPTIONS_COMPRESSION_C_S:
|
||||
v = value;
|
||||
if (v == NULL || v[0] == '\0') {
|
||||
|
||||
Reference in New Issue
Block a user