@@ -276,12 +276,6 @@ pub struct AuthenticatorClientPinParameters {
276
276
pub pin_hash_enc : Option < Vec < u8 > > ,
277
277
#[ cfg( feature = "with_ctap2_1" ) ]
278
278
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 > ,
285
279
}
286
280
287
281
impl TryFrom < cbor:: Value > for AuthenticatorClientPinParameters {
@@ -323,32 +317,6 @@ impl TryFrom<cbor::Value> for AuthenticatorClientPinParameters {
323
317
. map ( extract_unsigned)
324
318
. transpose ( ) ?;
325
319
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
-
352
320
Ok ( AuthenticatorClientPinParameters {
353
321
pin_protocol,
354
322
sub_command,
@@ -358,12 +326,6 @@ impl TryFrom<cbor::Value> for AuthenticatorClientPinParameters {
358
326
pin_hash_enc,
359
327
#[ cfg( feature = "with_ctap2_1" ) ]
360
328
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,
367
329
} )
368
330
}
369
331
}
@@ -495,12 +457,6 @@ mod test {
495
457
6 => vec! [ 0xDD ] ,
496
458
#[ cfg( feature = "with_ctap2_1" ) ]
497
459
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" ,
504
460
} ;
505
461
let returned_pin_protocol_parameters =
506
462
AuthenticatorClientPinParameters :: try_from ( cbor_value) . unwrap ( ) ;
@@ -512,14 +468,6 @@ mod test {
512
468
pin_auth : Some ( vec ! [ 0xBB ] ) ,
513
469
new_pin_enc : Some ( vec ! [ 0xCC ] ) ,
514
470
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" ) ,
523
471
} ;
524
472
525
473
assert_eq ! (
0 commit comments