mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-07 02:39:48 +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:
@@ -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