@@ -416,7 +416,7 @@ impl RequestCtap2 for GetAssertion {
416416 let msg = GetNextAssertion ;
417417 // We already have one, so skipping 0
418418 for _ in 1 ..number_of_credentials {
419- let assertion = dev. send_cbor ( & msg) ?;
419+ let assertion = dev. send_cbor ( & msg, None ) ?;
420420 results. push ( GetAssertionResult {
421421 assertion : assertion. into ( ) ,
422422 attachment : AuthenticatorAttachment :: Unknown ,
@@ -631,6 +631,7 @@ pub mod test {
631631 use crate :: transport:: { FidoDevice , FidoDeviceIO , FidoProtocol } ;
632632 use crate :: u2ftypes:: U2FDeviceInfo ;
633633 use rand:: { thread_rng, RngCore } ;
634+ use std:: sync:: mpsc:: channel;
634635
635636 #[ test]
636637 fn test_get_assertion_ctap2 ( ) {
@@ -788,7 +789,7 @@ pub mod test {
788789 attachment: AuthenticatorAttachment :: Unknown ,
789790 extensions: Default :: default ( ) ,
790791 } ] ;
791- let response = device. send_cbor ( & assertion) . unwrap ( ) ;
792+ let response = device. send_cbor ( & assertion, None ) . unwrap ( ) ;
792793 assert_eq ! ( response, expected) ;
793794 }
794795
@@ -869,6 +870,7 @@ pub mod test {
869870 device. set_cid ( cid) ;
870871
871872 // ctap1 request
873+ let ( tx, _rx) = channel ( ) ;
872874 fill_device_ctap1 (
873875 & mut device,
874876 cid,
@@ -880,6 +882,7 @@ pub mod test {
880882 & assertion. allow_list ,
881883 & assertion. rp ,
882884 & assertion. client_data_hash ,
885+ & tx,
883886 )
884887 . expect ( "Did not find a key_handle, even though it should have" ) ;
885888 assertion. allow_list = vec ! [ key_handle] ;
@@ -892,7 +895,7 @@ pub mod test {
892895 // Pre-flighting is not done automatically
893896 fill_device_ctap1 ( & mut device, cid, U2F_REQUEST_USER_PRESENCE , SW_NO_ERROR ) ;
894897
895- let response = device. send_ctap1 ( & assertion) . unwrap ( ) ;
898+ let response = device. send_ctap1 ( & assertion, None ) . unwrap ( ) ;
896899
897900 // Check if response is correct
898901 let expected_auth_data = AuthenticatorData {
@@ -958,12 +961,14 @@ pub mod test {
958961
959962 device. set_cid ( cid) ;
960963
964+ let ( tx, _rx) = channel ( ) ;
961965 assert_matches ! (
962966 do_credential_list_filtering_ctap1(
963967 & mut device,
964968 & assertion. allow_list,
965969 & assertion. rp,
966970 & assertion. client_data_hash,
971+ & tx,
967972 ) ,
968973 None
969974 ) ;
@@ -981,12 +986,14 @@ pub mod test {
981986 for allow_list in [ vec ! [ ] , vec ! [ too_long_key_handle. clone( ) ; 5 ] ] {
982987 assertion. allow_list = allow_list;
983988
989+ let ( tx, _rx) = channel ( ) ;
984990 assert_matches ! (
985991 do_credential_list_filtering_ctap1(
986992 & mut device,
987993 & assertion. allow_list,
988994 & assertion. rp,
989995 & assertion. client_data_hash,
996+ & tx,
990997 ) ,
991998 None
992999 ) ;
@@ -1017,11 +1024,13 @@ pub mod test {
10171024 U2F_CHECK_IS_REGISTERED ,
10181025 SW_CONDITIONS_NOT_SATISFIED ,
10191026 ) ;
1027+ let ( tx, _rx) = channel ( ) ;
10201028 let key_handle = do_credential_list_filtering_ctap1 (
10211029 & mut device,
10221030 & assertion. allow_list ,
10231031 & assertion. rp ,
10241032 & assertion. client_data_hash ,
1033+ & tx,
10251034 )
10261035 . expect ( "Did not find a key_handle, even though it should have" ) ;
10271036 assertion. allow_list = vec ! [ key_handle] ;
@@ -1034,7 +1043,7 @@ pub mod test {
10341043 // Pre-flighting is not done automatically
10351044 fill_device_ctap1 ( & mut device, cid, U2F_REQUEST_USER_PRESENCE , SW_NO_ERROR ) ;
10361045
1037- let response = device. send_ctap1 ( & assertion) . unwrap ( ) ;
1046+ let response = device. send_ctap1 ( & assertion, None ) . unwrap ( ) ;
10381047
10391048 // Check if response is correct
10401049 let expected_auth_data = AuthenticatorData {
@@ -1299,12 +1308,14 @@ pub mod test {
12991308 msg. extend ( & GET_ASSERTION_SAMPLE_RESPONSE_CTAP2 [ 293 ..] ) ;
13001309 device. add_read ( & msg, 0 ) ;
13011310
1311+ let ( tx, _rx) = channel ( ) ;
13021312 assert_matches ! (
13031313 do_credential_list_filtering_ctap2(
13041314 & mut device,
13051315 & assertion. allow_list,
13061316 & assertion. rp,
13071317 None ,
1318+ & tx,
13081319 ) ,
13091320 Ok ( ..)
13101321 ) ;
0 commit comments