Mercurial > dropbear
comparison svr-runopts.c @ 1532:3616ec41d03d
Only load dropbear default host keys if a key is not specified
author | CamVan Nguyen <ctnguyen@us.ibm.com> |
---|---|
date | Thu, 22 Feb 2018 21:55:15 +0800 |
parents | 2d450c1056e3 |
children | b918ad1c5b25 |
comparison
equal
deleted
inserted
replaced
1531:fa733a314bee | 1532:3616ec41d03d |
---|---|
508 char *hostkey_file = svr_opts.hostkey_files[i]; | 508 char *hostkey_file = svr_opts.hostkey_files[i]; |
509 loadhostkey(hostkey_file, 1); | 509 loadhostkey(hostkey_file, 1); |
510 m_free(hostkey_file); | 510 m_free(hostkey_file); |
511 } | 511 } |
512 | 512 |
513 /* Only load default host keys if a host key is not specified by the user */ | |
514 if (svr_opts.num_hostkey_files == 0) { | |
513 #if DROPBEAR_RSA | 515 #if DROPBEAR_RSA |
514 loadhostkey(RSA_PRIV_FILENAME, 0); | 516 loadhostkey(RSA_PRIV_FILENAME, 0); |
515 #endif | 517 #endif |
516 | 518 |
517 #if DROPBEAR_DSS | 519 #if DROPBEAR_DSS |
518 loadhostkey(DSS_PRIV_FILENAME, 0); | 520 loadhostkey(DSS_PRIV_FILENAME, 0); |
519 #endif | 521 #endif |
520 | 522 |
521 #if DROPBEAR_ECDSA | 523 #if DROPBEAR_ECDSA |
522 loadhostkey(ECDSA_PRIV_FILENAME, 0); | 524 loadhostkey(ECDSA_PRIV_FILENAME, 0); |
523 #endif | 525 #endif |
526 } | |
524 | 527 |
525 #if DROPBEAR_DELAY_HOSTKEY | 528 #if DROPBEAR_DELAY_HOSTKEY |
526 if (svr_opts.delay_hostkey) { | 529 if (svr_opts.delay_hostkey) { |
527 disable_unset_keys = 0; | 530 disable_unset_keys = 0; |
528 } | 531 } |