summaryrefslogtreecommitdiff
path: root/svr-authpubkey.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2022-11-09 16:14:59 +0800
committerMatt Johnston <matt@ucc.asn.au>2022-11-09 16:14:59 +0800
commit561ef41230c7beb5bb9eacff2854f1963121f31d (patch)
tree2ba7505ee38b4c4c5f38d3a83547e375c881940c /svr-authpubkey.c
parentab6ea4d697d317bca4385811c26376c25bc1b91d (diff)
parent62ea53c1e5c5d9a96263c966e20b6d6ffd764b41 (diff)
downloaddropbear-561ef41230c7beb5bb9eacff2854f1963121f31d.tar.gz
Merge egor-duda:sk-authkey-options
Github pull request #172
Diffstat (limited to 'svr-authpubkey.c')
-rw-r--r--svr-authpubkey.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/svr-authpubkey.c b/svr-authpubkey.c
index ab3046f..529280c 100644
--- a/svr-authpubkey.c
+++ b/svr-authpubkey.c
@@ -182,6 +182,16 @@ void svr_auth_pubkey(int valid_user) {
goto out;
}
+#if DROPBEAR_SK_ECDSA || DROPBEAR_SK_ED25519
+ key->sk_flags_mask = SSH_SK_USER_PRESENCE_REQD;
+ if (ses.authstate.pubkey_options && ses.authstate.pubkey_options->no_touch_required_flag) {
+ key->sk_flags_mask &= ~SSH_SK_USER_PRESENCE_REQD;
+ }
+ if (ses.authstate.pubkey_options && ses.authstate.pubkey_options->verify_required_flag) {
+ key->sk_flags_mask |= SSH_SK_USER_VERIFICATION_REQD;
+ }
+#endif
+
/* create the data which has been signed - this a string containing
* session_id, concatenated with the payload packet up to the signature */
assert(ses.payload_beginning <= ses.payload->pos);