Skip to content

Commit 1d4c4a5

Browse files
rockdrillamkj
authored andcommitted
fix build without pubkey options
fixes: - 98ef42a "Don't set pubkey_info directly in checkpubkey_line" - 62ea53c "Implement no-touch-required and verify-requred for authorized_keys file" Signed-off-by: Konstantin Demin <[email protected]>
1 parent a8610f7 commit 1d4c4a5

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/svr-authpubkey.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,14 @@ void svr_auth_pubkey(int valid_user) {
186186

187187
#if DROPBEAR_SK_ECDSA || DROPBEAR_SK_ED25519
188188
key->sk_flags_mask = SSH_SK_USER_PRESENCE_REQD;
189+
#if DROPBEAR_SVR_PUBKEY_OPTIONS_BUILT
189190
if (ses.authstate.pubkey_options && ses.authstate.pubkey_options->no_touch_required_flag) {
190191
key->sk_flags_mask &= ~SSH_SK_USER_PRESENCE_REQD;
191192
}
192193
if (ses.authstate.pubkey_options && ses.authstate.pubkey_options->verify_required_flag) {
193194
key->sk_flags_mask |= SSH_SK_USER_VERIFICATION_REQD;
194195
}
196+
#endif /* DROPBEAR_SVR_PUBKEY_OPTIONS */
195197
#endif
196198

197199
/* create the data which has been signed - this a string containing
@@ -513,7 +515,13 @@ static int checkpubkey(const char* keyalgo, unsigned int keyalgolen,
513515
line_num++;
514516

515517
ret = checkpubkey_line(line, line_num, filename, keyalgo, keyalgolen,
516-
keyblob, keybloblen, &ses.authstate.pubkey_info);
518+
keyblob, keybloblen,
519+
#if DROPBEAR_SVR_PUBKEY_OPTIONS_BUILT
520+
&ses.authstate.pubkey_info
521+
#else
522+
NULL
523+
#endif
524+
);
517525
if (ret == DROPBEAR_SUCCESS) {
518526
break;
519527
}

0 commit comments

Comments
 (0)