diff --git a/apps/vault/src/ctap/data_formats.rs b/apps/vault/src/ctap/data_formats.rs index 345ded26c..ea06cdde2 100644 --- a/apps/vault/src/ctap/data_formats.rs +++ b/apps/vault/src/ctap/data_formats.rs @@ -926,7 +926,16 @@ impl TryFrom for PinUvAuthProtocol { match extract_unsigned(cbor_value)? { 1 => Ok(PinUvAuthProtocol::V1), 2 => Ok(PinUvAuthProtocol::V2), - _ => Err(Ctap2StatusCode::CTAP1_ERR_INVALID_PARAMETER), + /* from this test: + https://github.com/google/CTAP2-test-tool/blob/1afd50bd1b700dc86d6dffeca70a331771d24e45/src/tests/make_credential.cc#L503-L515 + + Test successful: Tests the response on an empty PIN auth without a PIN in MakeCredential. + Test successful: Tests if the PIN protocol parameter is checked in MakeCredential. + Expected error code `CTAP2_ERR_PIN_AUTH_INVALID`, got `CTAP1_ERR_INVALID_PARAMETER`. + */ + _ => { + Err(Ctap2StatusCode::CTAP2_ERR_PIN_AUTH_INVALID) + }, } } }