comparison svr-runopts.c @ 976:964d41e3aeb2

Don't print "Failed loading hostkey" when -R delayed hostkey option is enabled
author Steven Honeyman <stevenhoneyman@gmail.com>
date Wed, 22 Oct 2014 07:12:52 +0800
parents f92eb625c48d
children 47643024fc90
comparison
equal deleted inserted replaced
974:7c9377467934 976:964d41e3aeb2
408 /* Must be called after syslog/etc is working */ 408 /* Must be called after syslog/etc is working */
409 static void loadhostkey(const char *keyfile, int fatal_duplicate) { 409 static void loadhostkey(const char *keyfile, int fatal_duplicate) {
410 sign_key * read_key = new_sign_key(); 410 sign_key * read_key = new_sign_key();
411 enum signkey_type type = DROPBEAR_SIGNKEY_ANY; 411 enum signkey_type type = DROPBEAR_SIGNKEY_ANY;
412 if (readhostkey(keyfile, read_key, &type) == DROPBEAR_FAILURE) { 412 if (readhostkey(keyfile, read_key, &type) == DROPBEAR_FAILURE) {
413 dropbear_log(LOG_WARNING, "Failed loading %s", keyfile); 413 if (!svr_opts.delay_hostkey) {
414 dropbear_log(LOG_WARNING, "Failed loading %s", keyfile);
415 }
414 } 416 }
415 417
416 #ifdef DROPBEAR_RSA 418 #ifdef DROPBEAR_RSA
417 if (type == DROPBEAR_SIGNKEY_RSA) { 419 if (type == DROPBEAR_SIGNKEY_RSA) {
418 loadhostkey_helper("RSA", (void**)&read_key->rsakey, (void**)&svr_opts.hostkey->rsakey, fatal_duplicate); 420 loadhostkey_helper("RSA", (void**)&read_key->rsakey, (void**)&svr_opts.hostkey->rsakey, fatal_duplicate);