comparison common-algo.c @ 1477:533e070b3126

Remove none cipher
author Matt Johnston <matt@ucc.asn.au>
date Fri, 09 Feb 2018 23:40:23 +0800
parents 06d52bcb8094
children b222c027a733
comparison
equal deleted inserted replaced
1476:8305ebe45940 1477:533e070b3126
177 #endif 177 #endif
178 #if DROPBEAR_BLOWFISH 178 #if DROPBEAR_BLOWFISH
179 {"blowfish-cbc", 0, &dropbear_blowfish, 1, &dropbear_mode_cbc}, 179 {"blowfish-cbc", 0, &dropbear_blowfish, 1, &dropbear_mode_cbc},
180 #endif 180 #endif
181 #endif /* DROPBEAR_ENABLE_CBC_MODE */ 181 #endif /* DROPBEAR_ENABLE_CBC_MODE */
182 #if DROPBEAR_NONE_CIPHER
183 {"none", 0, (void*)&dropbear_nocipher, 1, &dropbear_mode_none},
184 #endif
185 {NULL, 0, NULL, 0, NULL} 182 {NULL, 0, NULL, 0, NULL}
186 }; 183 };
187 184
188 algo_type sshhashes[] = { 185 algo_type sshhashes[] = {
189 #if DROPBEAR_SHA1_96_HMAC 186 #if DROPBEAR_SHA1_96_HMAC
463 460
464 out: 461 out:
465 m_free(algolist); 462 m_free(algolist);
466 return ret; 463 return ret;
467 } 464 }
468
469 #if DROPBEAR_NONE_CIPHER
470
471 void
472 set_algo_usable(algo_type algos[], const char * algo_name, int usable)
473 {
474 algo_type *a;
475 for (a = algos; a->name != NULL; a++)
476 {
477 if (strcmp(a->name, algo_name) == 0)
478 {
479 a->usable = usable;
480 return;
481 }
482 }
483 }
484
485 int
486 get_algo_usable(algo_type algos[], const char * algo_name)
487 {
488 algo_type *a;
489 for (a = algos; a->name != NULL; a++)
490 {
491 if (strcmp(a->name, algo_name) == 0)
492 {
493 return a->usable;
494 }
495 }
496 return 0;
497 }
498
499 #endif /* DROPBEAR_NONE_CIPHER */
500 465
501 #if DROPBEAR_USER_ALGO_LIST 466 #if DROPBEAR_USER_ALGO_LIST
502 467
503 char * 468 char *
504 algolist_string(const algo_type algos[]) 469 algolist_string(const algo_type algos[])