Reject RK option in get_assertion

The getAssertion command does not use the rk option so we return an
InvalidOption error if it is set.

Fixes: https://github.com/Nitrokey/fido-authenticator/issues/23
This commit is contained in:
Robin Krahl
2023-07-07 19:55:17 +02:00
parent 50589f4f62
commit 695bf3e83a
+5
View File
@@ -948,6 +948,11 @@ impl<UP: UserPresence, T: TrussedRequirements> Authenticator for crate::Authenti
// 6. process any options present
// RK is not supported in get_assertion
if parameters.options.as_ref().and_then(|options| options.rk).is_some() {
return Err(Error::InvalidOption);
}
// UP occurs by default, but option could specify not to.
let do_up = if parameters.options.is_some() {
parameters.options.as_ref().unwrap().up.unwrap_or(true)