Don't print "Failed loading hostkey" when -R delayed hostkey option is enabled

This commit is contained in:
Steven Honeyman 2014-10-22 07:12:52 +08:00
parent 776d908703
commit d88034434c

View File

@ -410,8 +410,10 @@ static void loadhostkey(const char *keyfile, int fatal_duplicate) {
sign_key * read_key = new_sign_key(); sign_key * read_key = new_sign_key();
enum signkey_type type = DROPBEAR_SIGNKEY_ANY; enum signkey_type type = DROPBEAR_SIGNKEY_ANY;
if (readhostkey(keyfile, read_key, &type) == DROPBEAR_FAILURE) { if (readhostkey(keyfile, read_key, &type) == DROPBEAR_FAILURE) {
if (!svr_opts.delay_hostkey) {
dropbear_log(LOG_WARNING, "Failed loading %s", keyfile); dropbear_log(LOG_WARNING, "Failed loading %s", keyfile);
} }
}
#ifdef DROPBEAR_RSA #ifdef DROPBEAR_RSA
if (type == DROPBEAR_SIGNKEY_RSA) { if (type == DROPBEAR_SIGNKEY_RSA) {