@@ -8,7 +8,7 @@ use libwebauthn::ops::webauthn::{
88use libwebauthn:: pin:: PinManagement ;
99use libwebauthn:: proto:: ctap2:: { Ctap2PinUvAuthProtocol , Ctap2PublicKeyCredentialDescriptor } ;
1010use libwebauthn:: transport:: hid:: channel:: HidChannel ;
11- use libwebauthn:: transport:: { Channel , Ctap2AuthTokenStore , Device } ;
11+ use libwebauthn:: transport:: { Channel , ChannelSettings , Ctap2AuthTokenStore , Device } ;
1212use libwebauthn:: webauthn:: { Error as WebAuthnError , PlatformError , WebAuthn } ;
1313use libwebauthn:: UvUpdate ;
1414use libwebauthn:: {
@@ -28,14 +28,14 @@ const TIMEOUT: Duration = Duration::from_secs(10);
2828#[ test( tokio:: test) ]
2929async fn test_webauthn_prf_no_pin_set ( ) {
3030 let mut device = get_virtual_device ( ) ;
31- let mut channel = device. channel ( ) . await . unwrap ( ) ;
31+ let mut channel = device. channel ( ChannelSettings :: default ( ) ) . await . unwrap ( ) ;
3232 run_test_battery ( & mut channel, false ) . await ;
3333}
3434
3535#[ test( tokio:: test) ]
3636async fn test_webauthn_prf_with_pin_set ( ) {
3737 let mut device = get_virtual_device ( ) ;
38- let mut channel = device. channel ( ) . await . unwrap ( ) ;
38+ let mut channel = device. channel ( ChannelSettings :: default ( ) ) . await . unwrap ( ) ;
3939 channel
4040 . change_pin ( String :: from ( "1234" ) , TIMEOUT )
4141 . await
@@ -46,7 +46,7 @@ async fn test_webauthn_prf_with_pin_set() {
4646#[ test( tokio:: test) ]
4747async fn test_webauthn_prf_with_pin_set_forced_pin_protocol_one ( ) {
4848 let mut device = get_virtual_device ( ) ;
49- let mut channel = device. channel ( ) . await . unwrap ( ) ;
49+ let mut channel = device. channel ( ChannelSettings :: default ( ) ) . await . unwrap ( ) ;
5050 channel. set_forced_pin_protocol ( Ctap2PinUvAuthProtocol :: One ) ;
5151 channel
5252 . change_pin ( String :: from ( "1234" ) , TIMEOUT )
@@ -58,7 +58,7 @@ async fn test_webauthn_prf_with_pin_set_forced_pin_protocol_one() {
5858#[ test( tokio:: test) ]
5959async fn test_webauthn_prf_with_pin_set_forced_pin_protocol_two ( ) {
6060 let mut device = get_virtual_device ( ) ;
61- let mut channel = device. channel ( ) . await . unwrap ( ) ;
61+ let mut channel = device. channel ( ChannelSettings :: default ( ) ) . await . unwrap ( ) ;
6262 channel. set_forced_pin_protocol ( Ctap2PinUvAuthProtocol :: Two ) ;
6363 channel
6464 . change_pin ( String :: from ( "1234" ) , TIMEOUT )
@@ -74,7 +74,7 @@ async fn test_webauthn_prf_with_pin_set_forced_pin_protocol_two() {
7474#[ test( tokio:: test) ]
7575async fn test_webauthn_prf_eval_at_create_degrades_when_unsupported ( ) {
7676 let mut device = get_virtual_device ( ) ;
77- let mut channel = device. channel ( ) . await . unwrap ( ) ;
77+ let mut channel = device. channel ( ChannelSettings :: default ( ) ) . await . unwrap ( ) ;
7878 let state_recv = channel. get_ux_update_receiver ( ) ;
7979 // PRF forces UV=required (webauthn#2337); no-PIN device drives PIN setup.
8080 tokio:: spawn ( handle_updates (
@@ -659,7 +659,7 @@ async fn run_failed_test(
659659#[ test( tokio:: test) ]
660660async fn test_webauthn_prf_variable_length_input ( ) {
661661 let mut device = get_virtual_device ( ) ;
662- let mut channel = device. channel ( ) . await . unwrap ( ) ;
662+ let mut channel = device. channel ( ChannelSettings :: default ( ) ) . await . unwrap ( ) ;
663663
664664 let user_id: [ u8 ; 32 ] = thread_rng ( ) . gen ( ) ;
665665 let challenge: [ u8 ; 32 ] = thread_rng ( ) . gen ( ) ;
@@ -810,7 +810,7 @@ fn basic_make_credential_request(
810810#[ test( tokio:: test) ]
811811async fn test_webauthn_prf_upgrades_uv_at_registration ( ) {
812812 let mut device = get_virtual_device ( ) ;
813- let mut channel = device. channel ( ) . await . unwrap ( ) ;
813+ let mut channel = device. channel ( ChannelSettings :: default ( ) ) . await . unwrap ( ) ;
814814 channel. change_pin ( "1234" . into ( ) , TIMEOUT ) . await . unwrap ( ) ;
815815
816816 let state_recv = channel. get_ux_update_receiver ( ) ;
@@ -852,7 +852,7 @@ async fn test_webauthn_prf_upgrades_uv_at_registration() {
852852#[ test( tokio:: test) ]
853853async fn test_webauthn_no_prf_no_upgrade ( ) {
854854 let mut device = get_virtual_device ( ) ;
855- let mut channel = device. channel ( ) . await . unwrap ( ) ;
855+ let mut channel = device. channel ( ChannelSettings :: default ( ) ) . await . unwrap ( ) ;
856856 channel. change_pin ( "1234" . into ( ) , TIMEOUT ) . await . unwrap ( ) ;
857857
858858 let state_recv = channel. get_ux_update_receiver ( ) ;
@@ -886,7 +886,7 @@ async fn test_webauthn_no_prf_no_upgrade() {
886886#[ test( tokio:: test) ]
887887async fn test_webauthn_prf_upgrades_uv_at_assertion ( ) {
888888 let mut device = get_virtual_device ( ) ;
889- let mut channel = device. channel ( ) . await . unwrap ( ) ;
889+ let mut channel = device. channel ( ChannelSettings :: default ( ) ) . await . unwrap ( ) ;
890890 channel. change_pin ( "1234" . into ( ) , TIMEOUT ) . await . unwrap ( ) ;
891891
892892 let user_id: [ u8 ; 32 ] = thread_rng ( ) . gen ( ) ;
0 commit comments