kex: Use ssh_kex_types_e in ssh_verify_existing_algo()

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Andreas Schneider
2017-08-24 17:43:01 +02:00
parent 316ee071cf
commit 6803c2f86d
2 changed files with 7 additions and 3 deletions

View File

@@ -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);