Skip to content

Commit 9bb1cab

Browse files
Update libwebauthn to 0.3.0
Switch from a git rev pin to the published 0.3.0 release on crates.io. Adapt to new APIs: - CableQrCodeDevice::new_transient now returns Result<Self, Error>. - UvUpdate gained a PinNotSet variant; handle it (currently logs an error pending UI support for PIN setup).
1 parent 639d422 commit 9bb1cab

5 files changed

Lines changed: 17 additions & 4 deletions

File tree

Cargo.lock

Lines changed: 3 additions & 2 deletions
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
@@ -11,7 +11,7 @@ async-trait = "0.1.89"
1111
base64 = "0.22.1"
1212
credentialsd-common = { path = "../credentialsd-common" }
1313
futures-lite.workspace = true
14-
libwebauthn = { git = "https://github.com/linux-credentials/libwebauthn.git", rev="b306a527e5b20bef3126a0ade020ae8269785b4e", features = ["libnfc","pcsc"] }
14+
libwebauthn = { version = "0.3.0", features = ["libnfc","pcsc"] }
1515
# TODO: split nfc and pcsc into separate features
1616
# Also, 0.6.1 fails to build with non-vendored library.
1717
# https://github.com/alexrsagen/rs-nfc1/issues/15

credentialsd/src/credential_service/hybrid.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,13 @@ impl HybridHandler for InternalHybridHandler {
5151
QrCodeOperationHint::GetAssertionRequest
5252
}
5353
};
54-
let mut device = CableQrCodeDevice::new_transient(hint);
54+
let mut device = match CableQrCodeDevice::new_transient(hint) {
55+
Ok(device) => device,
56+
Err(err) => {
57+
tracing::error!("Failed to create caBLE QR code device: {:?}", err);
58+
return;
59+
}
60+
};
5561
let qr_code = device.qr_code.to_string();
5662
if let Err(err) = tx.send(HybridStateInternal::Init(qr_code)).await {
5763
tracing::error!("Failed to send caBLE update: {:?}", err);

credentialsd/src/credential_service/nfc.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,9 @@ async fn handle_nfc_updates(
530530
UvUpdate::PresenceRequired => {
531531
tracing::debug!("Authenticator requested user presence, but that makes no sense for NFC. Skipping");
532532
}
533+
UvUpdate::PinNotSet(_) => {
534+
tracing::error!("Authenticator requested PIN setup, which is not yet supported.");
535+
}
533536
}
534537
}
535538
debug!("NFC update channel closed.");

credentialsd/src/credential_service/usb.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,9 @@ async fn handle_usb_updates(
641641
tracing::error!("Authenticator requested user presence, but we cannot relay the message to the credential service: {:?}", err);
642642
}
643643
}
644+
UvUpdate::PinNotSet(_) => {
645+
tracing::error!("Authenticator requested PIN setup, which is not yet supported.");
646+
}
644647
}
645648
}
646649
debug!("USB update channel closed.");

0 commit comments

Comments
 (0)