fail on UP=true in make

This commit is contained in:
Fabian Kaczmarczyck
2020-11-20 03:26:26 +01:00
parent a412da8c73
commit 5bf73cb8fd

View File

@@ -361,11 +361,9 @@ impl TryFrom<cbor::Value> for MakeCredentialOptions {
Some(options_entry) => extract_bool(options_entry)?,
None => false,
};
if let Some(options_entry) = up {
if !extract_bool(options_entry)? {
if up.is_some() {
return Err(Ctap2StatusCode::CTAP2_ERR_INVALID_OPTION);
}
}
let uv = match uv {
Some(options_entry) => extract_bool(options_entry)?,
None => false,