Skip to content

Commit 4fec405

Browse files
committed
still has the compiler error
1 parent 980cf36 commit 4fec405

File tree

1 file changed

+0
-52
lines changed

1 file changed

+0
-52
lines changed

src/ctap/command.rs

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -276,12 +276,6 @@ pub struct AuthenticatorClientPinParameters {
276276
pub pin_hash_enc: Option<Vec<u8>>,
277277
#[cfg(feature = "with_ctap2_1")]
278278
pub min_pin_length: Option<u64>,
279-
#[cfg(feature = "with_ctap2_1")]
280-
pub min_pin_length_rp_ids: Option<Vec<String>>,
281-
#[cfg(feature = "with_ctap2_1")]
282-
pub permissions: Option<u8>,
283-
#[cfg(feature = "with_ctap2_1")]
284-
pub permissions_rp_id: Option<String>,
285279
}
286280

287281
impl TryFrom<cbor::Value> for AuthenticatorClientPinParameters {
@@ -323,32 +317,6 @@ impl TryFrom<cbor::Value> for AuthenticatorClientPinParameters {
323317
.map(extract_unsigned)
324318
.transpose()?;
325319

326-
#[cfg(feature = "with_ctap2_1")]
327-
let min_pin_length_rp_ids = match param_map.remove(&cbor_unsigned!(8)) {
328-
Some(entry) => Some(
329-
extract_array(entry)?
330-
.into_iter()
331-
.map(extract_text_string)
332-
.collect::<Result<Vec<String>, Ctap2StatusCode>>()?,
333-
),
334-
None => None,
335-
};
336-
337-
#[cfg(feature = "with_ctap2_1")]
338-
// We expect a bit field of 8 bits, and drop everything else.
339-
// This means we ignore extensions in future versions.
340-
let permissions = param_map
341-
.remove(&cbor_unsigned!(9))
342-
.map(extract_unsigned)
343-
.transpose()?
344-
.map(|p| p as u8);
345-
346-
#[cfg(feature = "with_ctap2_1")]
347-
let permissions_rp_id = param_map
348-
.remove(&cbor_unsigned!(10))
349-
.map(extract_text_string)
350-
.transpose()?;
351-
352320
Ok(AuthenticatorClientPinParameters {
353321
pin_protocol,
354322
sub_command,
@@ -358,12 +326,6 @@ impl TryFrom<cbor::Value> for AuthenticatorClientPinParameters {
358326
pin_hash_enc,
359327
#[cfg(feature = "with_ctap2_1")]
360328
min_pin_length,
361-
#[cfg(feature = "with_ctap2_1")]
362-
min_pin_length_rp_ids,
363-
#[cfg(feature = "with_ctap2_1")]
364-
permissions,
365-
#[cfg(feature = "with_ctap2_1")]
366-
permissions_rp_id,
367329
})
368330
}
369331
}
@@ -495,12 +457,6 @@ mod test {
495457
6 => vec! [0xDD],
496458
#[cfg(feature = "with_ctap2_1")]
497459
7 => 4,
498-
#[cfg(feature = "with_ctap2_1")]
499-
8 => vec! ["example.com"],
500-
#[cfg(feature = "with_ctap2_1")]
501-
9 => 0x03,
502-
#[cfg(feature = "with_ctap2_1")]
503-
10 => "example.com",
504460
};
505461
let returned_pin_protocol_parameters =
506462
AuthenticatorClientPinParameters::try_from(cbor_value).unwrap();
@@ -512,14 +468,6 @@ mod test {
512468
pin_auth: Some(vec![0xBB]),
513469
new_pin_enc: Some(vec![0xCC]),
514470
pin_hash_enc: Some(vec![0xDD]),
515-
#[cfg(feature = "with_ctap2_1")]
516-
min_pin_length: Some(4),
517-
#[cfg(feature = "with_ctap2_1")]
518-
min_pin_length_rp_ids: Some(vec!["example.com"]),
519-
#[cfg(feature = "with_ctap2_1")]
520-
permissions: Some(0x03),
521-
#[cfg(feature = "with_ctap2_1")]
522-
permissions_rp_id: Some("example.com"),
523471
};
524472

525473
assert_eq!(

0 commit comments

Comments
 (0)