Skip to content

Commit

Permalink
Fix compile when disabling SHA-1
Browse files Browse the repository at this point in the history
Fixes compile when disabling SHA-1 with

  #define DROPBEAR_SHA1_HMAC 0
  #define DROPBEAR_RSA_SHA1 0
  #define DROPBEAR_DH_GROUP14_SHA1 0

while keeping SHA-256 enabled.

Should also fix the opposite, but that is not a recommended
configuration.
  • Loading branch information
nafmo authored and mkj committed Apr 5, 2024
1 parent 047bdd4 commit c852ec8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/svr-runopts.c
Original file line number Diff line number Diff line change
Expand Up @@ -610,8 +610,12 @@ void load_all_hostkeys() {

#if DROPBEAR_RSA
if (!svr_opts.delay_hostkey && !svr_opts.hostkey->rsakey) {
#if DROPBEAR_RSA_SHA256
disablekey(DROPBEAR_SIGNATURE_RSA_SHA256);
#endif
#if DROPBEAR_RSA_SHA1
disablekey(DROPBEAR_SIGNATURE_RSA_SHA1);
#endif
} else {
any_keys = 1;
}
Expand Down

0 comments on commit c852ec8

Please sign in to comment.