Skip to content

Commit b2e5859

Browse files
committed
Switch back to official libwebauthn repo
1 parent ff18e59 commit b2e5859

File tree

5 files changed

+7
-13
lines changed

5 files changed

+7
-13
lines changed

credentialsd-common/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ license = "LGPL-3.0-only"
88
[dependencies]
99
futures-lite = "2.6.0"
1010
# libwebauthn = "0.2"
11-
libwebauthn = { git = "https://github.com/msirringhaus/libwebauthn.git", branch="nfc_followup", features = ["libnfc", "pcsc"] }
11+
libwebauthn = { git = "https://github.com/linux-credentials/libwebauthn.git", revision="604b53b", features = ["libnfc","pcsc"] }
1212
serde = { version = "1", features = ["derive"] }
1313
zvariant = "5.6.0"

credentialsd-ui/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

credentialsd/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

credentialsd/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ async-trait = "0.1.88"
1414
base64 = "0.22.1"
1515
credentialsd-common = { path = "../credentialsd-common" }
1616
futures-lite = "2.6.0"
17-
libwebauthn = { git = "https://github.com/msirringhaus/libwebauthn.git", branch="nfc_followup", features = ["libnfc","pcsc"] }
17+
libwebauthn = { git = "https://github.com/linux-credentials/libwebauthn.git", revision="604b53b", features = ["libnfc","pcsc"] }
1818
# libwebauthn = "~0.2.2"
1919
openssl = "0.10.72"
2020
rand = "0.9.2"

credentialsd/src/credential_service/nfc.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,9 @@ impl InProcessNfcHandler {
3535
failures: &mut usize,
3636
prev_nfc_state: &NfcStateInternal,
3737
) -> Result<NfcStateInternal, Error> {
38-
match libwebauthn::transport::nfc::list_devices().await {
39-
Ok(mut hid_devices) => {
40-
if hid_devices.is_empty() {
41-
let state = NfcStateInternal::Waiting;
42-
Ok(state)
43-
} else {
44-
Ok(NfcStateInternal::Connected(hid_devices.swap_remove(0)))
45-
}
46-
}
38+
match libwebauthn::transport::nfc::get_nfc_device().await {
39+
Ok(None) => Ok(NfcStateInternal::Waiting),
40+
Ok(Some(hid_device)) => Ok(NfcStateInternal::Connected(hid_device)),
4741
Err(err) => {
4842
*failures += 1;
4943
if *failures == 5 {

0 commit comments

Comments
 (0)