File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
libwebauthn/src/management Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 8181 let req = Ctap2BioEnrollmentRequest :: new_get_modality ( ) ;
8282 // No UV needed
8383 let resp = self . ctap2_bio_enrollment ( & req, timeout) . await ?;
84- resp. modality . ok_or ( Error :: Ctap ( CtapError :: Other ) )
84+ match resp. modality {
85+ Some ( modality) => Ok ( modality) ,
86+ None => {
87+ info ! ( "Channel did not return modality." ) ;
88+ Err ( Error :: Ctap ( CtapError :: Other ) )
89+ }
90+ }
8591 }
8692
8793 async fn get_fingerprint_sensor_info (
9197 let req = Ctap2BioEnrollmentRequest :: new_fingerprint_sensor_info ( ) ;
9298 // No UV needed
9399 let resp = self . ctap2_bio_enrollment ( & req, timeout) . await ?;
100+ let Some ( fingerprint_kind) = resp. fingerprint_kind else {
101+ info ! ( "Channel did not return fingerprint_kind Sensor Info" ) ;
102+ return Err ( Error :: Ctap ( CtapError :: Other ) )
103+ } ;
94104 Ok ( Ctap2BioEnrollmentFingerprintSensorInfo {
95- fingerprint_kind : resp . fingerprint_kind . ok_or ( Error :: Ctap ( CtapError :: Other ) ) ? ,
105+ fingerprint_kind,
96106 max_capture_samples_required_for_enroll : resp
97107 . max_capture_samples_required_for_enroll
98108 . clone ( ) ,
You can’t perform that action at this time.
0 commit comments