diff options
author | Matt Johnston <matt@ucc.asn.au> | 2013-12-03 21:26:59 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2013-12-03 21:26:59 +0800 |
commit | 092a4d9a7edb88ccfc4867081fa7021290e51818 (patch) | |
tree | e69a0613c48b203dce43b29d0774da73555ded35 /svr-runopts.c | |
parent | b3cab3ce3163083bbff9561a54369056793ab73d (diff) |
Fix disabling DSS key
Diffstat (limited to 'svr-runopts.c')
-rw-r--r-- | svr-runopts.c | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/svr-runopts.c b/svr-runopts.c index 9fbacf7..414cb45 100644 --- a/svr-runopts.c +++ b/svr-runopts.c @@ -475,8 +475,7 @@ void load_all_hostkeys() { #endif #ifdef DROPBEAR_DELAY_HOSTKEY - if (svr_opts.delay_hostkey) - { + if (svr_opts.delay_hostkey) { disable_unset_keys = 0; } #endif @@ -484,19 +483,15 @@ void load_all_hostkeys() { #ifdef DROPBEAR_RSA if (disable_unset_keys && !svr_opts.hostkey->rsakey) { disablekey(DROPBEAR_SIGNKEY_RSA); - } - else - { + } else { any_keys = 1; } #endif #ifdef DROPBEAR_DSS if (disable_unset_keys && !svr_opts.hostkey->dsskey) { - disablekey(DROPBEAR_SIGNKEY_RSA); - } - else - { + disablekey(DROPBEAR_SIGNKEY_DSS); + } else { any_keys = 1; } #endif @@ -507,9 +502,7 @@ void load_all_hostkeys() { if ((disable_unset_keys || ECDSA_DEFAULT_SIZE != 256) && !svr_opts.hostkey->ecckey256) { disablekey(DROPBEAR_SIGNKEY_ECDSA_NISTP256); - } - else - { + } else { any_keys = 1; } #endif @@ -518,9 +511,7 @@ void load_all_hostkeys() { if ((disable_unset_keys || ECDSA_DEFAULT_SIZE != 384) && !svr_opts.hostkey->ecckey384) { disablekey(DROPBEAR_SIGNKEY_ECDSA_NISTP384); - } - else - { + } else { any_keys = 1; } #endif @@ -529,17 +520,13 @@ void load_all_hostkeys() { if ((disable_unset_keys || ECDSA_DEFAULT_SIZE != 521) && !svr_opts.hostkey->ecckey521) { disablekey(DROPBEAR_SIGNKEY_ECDSA_NISTP521); - } - else - { + } else { any_keys = 1; } #endif #endif /* DROPBEAR_ECDSA */ - if (!any_keys) - { + if (!any_keys) { dropbear_exit("No hostkeys available"); } - } |