diff options
author | Matt Johnston <matt@ucc.asn.au> | 2022-11-09 16:14:59 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2022-11-09 16:14:59 +0800 |
commit | 561ef41230c7beb5bb9eacff2854f1963121f31d (patch) | |
tree | 2ba7505ee38b4c4c5f38d3a83547e375c881940c /svr-authpubkey.c | |
parent | ab6ea4d697d317bca4385811c26376c25bc1b91d (diff) | |
parent | 62ea53c1e5c5d9a96263c966e20b6d6ffd764b41 (diff) | |
download | dropbear-561ef41230c7beb5bb9eacff2854f1963121f31d.tar.gz |
Merge egor-duda:sk-authkey-options
Github pull request #172
Diffstat (limited to 'svr-authpubkey.c')
-rw-r--r-- | svr-authpubkey.c | 10 |
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); |