mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-29 01:03:57 +03:00
Test for ecdh and dh-group1
This commit is contained in:
@@ -312,6 +312,11 @@ int ssh_options_set_algo(ssh_session session, int algo,
|
||||
* Set the symmetric cipher server to client (const char *,
|
||||
* comma-separated list).
|
||||
*
|
||||
* - SSH_OPTIONS_KEY_EXCHANGE:
|
||||
* Set the key exchange method to be used (const char *,
|
||||
* comma-separated list). ex:
|
||||
* "ecdh-sha2-nistp256,diffie-hellman-group1-sha1"
|
||||
*
|
||||
* - SSH_OPTIONS_COMPRESSION_C_S:
|
||||
* Set the compression to use for client to server
|
||||
* communication (const char *, "yes", "no" or a specific
|
||||
@@ -583,6 +588,15 @@ int ssh_options_set(ssh_session session, enum ssh_options_e type,
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
case SSH_OPTIONS_KEY_EXCHANGE:
|
||||
if(value == NULL) {
|
||||
ssh_set_error_invalid(session, __FUNCTION__);
|
||||
return -1;
|
||||
} else {
|
||||
if (ssh_options_set_algo(session, SSH_KEX, value) < 0)
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
case SSH_OPTIONS_COMPRESSION_C_S:
|
||||
if (value == NULL) {
|
||||
ssh_set_error_invalid(session, __FUNCTION__);
|
||||
|
||||
Reference in New Issue
Block a user