mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-10 18:28:10 +09:00
kex: Use ssh_kex_types_e in ssh_verify_existing_algo()
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -40,7 +40,7 @@ int ssh_send_kex(ssh_session session, int server_kex);
|
||||
void ssh_list_kex(struct ssh_kex_struct *kex);
|
||||
int ssh_set_client_kex(ssh_session session);
|
||||
int ssh_kex_select_methods(ssh_session session);
|
||||
int ssh_verify_existing_algo(int algo, const char *name);
|
||||
int ssh_verify_existing_algo(enum ssh_kex_types_e algo, const char *name);
|
||||
char *ssh_keep_known_algos(enum ssh_kex_types_e algo, const char *list);
|
||||
char **ssh_space_tokenize(const char *chain);
|
||||
int ssh_get_kex1(ssh_session session);
|
||||
|
||||
@@ -721,10 +721,14 @@ error:
|
||||
}
|
||||
|
||||
/* returns 1 if at least one of the name algos is in the default algorithms table */
|
||||
int ssh_verify_existing_algo(int algo, const char *name){
|
||||
int ssh_verify_existing_algo(enum ssh_kex_types_e algo, const char *name)
|
||||
{
|
||||
char *ptr;
|
||||
if(algo>9 || algo <0)
|
||||
|
||||
if (algo > SSH_LANG_S_C) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
ptr=ssh_find_matching(supported_methods[algo],name);
|
||||
if(ptr){
|
||||
free(ptr);
|
||||
|
||||
Reference in New Issue
Block a user