Skip to content
Snippets Groups Projects
Commit 092a4d9a authored by Matt Johnston's avatar Matt Johnston
Browse files

Fix disabling DSS key

parent b3cab3ce
Branches
Tags
No related merge requests found
...@@ -475,8 +475,7 @@ void load_all_hostkeys() { ...@@ -475,8 +475,7 @@ void load_all_hostkeys() {
#endif #endif
#ifdef DROPBEAR_DELAY_HOSTKEY #ifdef DROPBEAR_DELAY_HOSTKEY
if (svr_opts.delay_hostkey) if (svr_opts.delay_hostkey) {
{
disable_unset_keys = 0; disable_unset_keys = 0;
} }
#endif #endif
...@@ -484,19 +483,15 @@ void load_all_hostkeys() { ...@@ -484,19 +483,15 @@ void load_all_hostkeys() {
#ifdef DROPBEAR_RSA #ifdef DROPBEAR_RSA
if (disable_unset_keys && !svr_opts.hostkey->rsakey) { if (disable_unset_keys && !svr_opts.hostkey->rsakey) {
disablekey(DROPBEAR_SIGNKEY_RSA); disablekey(DROPBEAR_SIGNKEY_RSA);
} } else {
else
{
any_keys = 1; any_keys = 1;
} }
#endif #endif
#ifdef DROPBEAR_DSS #ifdef DROPBEAR_DSS
if (disable_unset_keys && !svr_opts.hostkey->dsskey) { if (disable_unset_keys && !svr_opts.hostkey->dsskey) {
disablekey(DROPBEAR_SIGNKEY_RSA); disablekey(DROPBEAR_SIGNKEY_DSS);
} } else {
else
{
any_keys = 1; any_keys = 1;
} }
#endif #endif
...@@ -507,9 +502,7 @@ void load_all_hostkeys() { ...@@ -507,9 +502,7 @@ void load_all_hostkeys() {
if ((disable_unset_keys || ECDSA_DEFAULT_SIZE != 256) if ((disable_unset_keys || ECDSA_DEFAULT_SIZE != 256)
&& !svr_opts.hostkey->ecckey256) { && !svr_opts.hostkey->ecckey256) {
disablekey(DROPBEAR_SIGNKEY_ECDSA_NISTP256); disablekey(DROPBEAR_SIGNKEY_ECDSA_NISTP256);
} } else {
else
{
any_keys = 1; any_keys = 1;
} }
#endif #endif
...@@ -518,9 +511,7 @@ void load_all_hostkeys() { ...@@ -518,9 +511,7 @@ void load_all_hostkeys() {
if ((disable_unset_keys || ECDSA_DEFAULT_SIZE != 384) if ((disable_unset_keys || ECDSA_DEFAULT_SIZE != 384)
&& !svr_opts.hostkey->ecckey384) { && !svr_opts.hostkey->ecckey384) {
disablekey(DROPBEAR_SIGNKEY_ECDSA_NISTP384); disablekey(DROPBEAR_SIGNKEY_ECDSA_NISTP384);
} } else {
else
{
any_keys = 1; any_keys = 1;
} }
#endif #endif
...@@ -529,17 +520,13 @@ void load_all_hostkeys() { ...@@ -529,17 +520,13 @@ void load_all_hostkeys() {
if ((disable_unset_keys || ECDSA_DEFAULT_SIZE != 521) if ((disable_unset_keys || ECDSA_DEFAULT_SIZE != 521)
&& !svr_opts.hostkey->ecckey521) { && !svr_opts.hostkey->ecckey521) {
disablekey(DROPBEAR_SIGNKEY_ECDSA_NISTP521); disablekey(DROPBEAR_SIGNKEY_ECDSA_NISTP521);
} } else {
else
{
any_keys = 1; any_keys = 1;
} }
#endif #endif
#endif /* DROPBEAR_ECDSA */ #endif /* DROPBEAR_ECDSA */
if (!any_keys) if (!any_keys) {
{
dropbear_exit("No hostkeys available"); dropbear_exit("No hostkeys available");
} }
} }
...@@ -142,7 +142,7 @@ void svr_dropbear_exit(int exitcode, const char* format, va_list param) { ...@@ -142,7 +142,7 @@ void svr_dropbear_exit(int exitcode, const char* format, va_list param) {
if (!sessinitdone) { if (!sessinitdone) {
/* before session init */ /* before session init */
snprintf(fmtbuf, sizeof(fmtbuf), snprintf(fmtbuf, sizeof(fmtbuf),
"Premature exit: %s", format); "Early exit: %s", format);
} else if (ses.authstate.authdone) { } else if (ses.authstate.authdone) {
/* user has authenticated */ /* user has authenticated */
snprintf(fmtbuf, sizeof(fmtbuf), snprintf(fmtbuf, sizeof(fmtbuf),
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment