Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 0 additions & 56 deletions .github/workflows/rust-clippy.yml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/rust-latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Latest stable toolchain
on:
push:
branches: [master]
schedule:
- cron: '37 10 * * 6'
workflow_dispatch:

jobs:
latest-stable:
env:
RUST_LOG: debug
# Early warning for toolchain drift. The build job is pinned, so without this a new
# compiler or a new clippy lint would go unnoticed until someone bumped the pin by hand.
# It does not run on pull requests, so it can never block a merge.
name: Build and run tests on latest stable
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Update apt cache
run: sudo apt-get update
- name: Install system dependencies
run: sudo apt-get install libudev-dev libdbus-1-dev libsodium-dev libnfc-dev libpcsclite-dev publicsuffix
- name: Install latest stable toolchain
run: rustup toolchain install stable --profile minimal -c clippy,rustfmt && rustup default stable
- name: Clippy
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
- name: Check formatting
run: cargo fmt --all -- --check
- name: Build
run: cargo build --workspace --all-targets --all-features
- name: Build with only nfc-backend-pcsc
run: cargo build -p libwebauthn --examples --features nfc-backend-pcsc
- name: Build with only nfc-backend-libnfc
run: cargo build -p libwebauthn --examples --features nfc-backend-libnfc
- name: Run tests
run: cargo test --workspace --verbose
env:
LIBWEBAUTHN_PSL_SYSTEM_TEST: "1"
- name: Run tests with nfc-backend-pcsc
run: cargo test -p libwebauthn --lib --features nfc-backend-pcsc --verbose
env:
LIBWEBAUTHN_PSL_SYSTEM_TEST: "1"
- name: Verify libwebauthn publishes cleanly
run: cargo publish --dry-run -p libwebauthn
4 changes: 2 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
# Drop the toolchain the image ships with once we have switched off it. The job builds the
# workspace three times over, and the runner does not have the disk to spare for both.
run: |
rustup toolchain install 1.96.1 --profile minimal -c clippy,rustfmt
rustup default 1.96.1
rustup toolchain install 1.97.0 --profile minimal -c clippy,rustfmt
rustup default 1.97.0
rustup toolchain uninstall stable
- name: Clippy
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
Expand Down
2 changes: 1 addition & 1 deletion libwebauthn-tests/tests/basic_ctap1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ async fn handle_updates(mut state_recv: Receiver<UvUpdate>) {
async fn test_webauthn_basic_ctap1() {
let mut device = get_virtual_device();

println!("Selected HID authenticator: {}", &device);
println!("Selected HID authenticator: {}", device);
let mut channel = device.channel(ChannelSettings::default()).await.unwrap();
channel.wink(TIMEOUT).await.unwrap();

Expand Down
2 changes: 1 addition & 1 deletion libwebauthn-tests/tests/basic_ctap2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ async fn test_webauthn_basic_ctap2() {
let user_id: [u8; 32] = thread_rng().gen();
let challenge: [u8; 32] = thread_rng().gen();

println!("Selected HID authenticator: {}", &device);
println!("Selected HID authenticator: {}", device);
let mut channel = device.channel(ChannelSettings::default()).await.unwrap();
channel.wink(TIMEOUT).await.unwrap();

Expand Down
2 changes: 1 addition & 1 deletion libwebauthn/examples/ceremony/u2f_nfc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub async fn main() -> Result<(), Box<dyn Error>> {
let device = get_nfc_device().await?;

if let Some(mut device) = device {
println!("Selected NFC authenticator: {}", &device);
println!("Selected NFC authenticator: {}", device);
let mut channel = device.channel(ChannelSettings::default()).await?;

const APP_ID: &str = "https://foo.example.org";
Expand Down
2 changes: 1 addition & 1 deletion libwebauthn/examples/ceremony/webauthn_ble.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub async fn main() -> Result<(), Box<dyn Error>> {
println!("Devices found: {:?}", devices);

for mut device in devices {
println!("Selected BLE authenticator: {}", &device);
println!("Selected BLE authenticator: {}", device);
let mut channel = device.channel(ChannelSettings::default()).await?;

let request_origin: RequestOrigin =
Expand Down
2 changes: 1 addition & 1 deletion libwebauthn/examples/ceremony/webauthn_hid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub async fn main() -> Result<(), Box<dyn Error>> {
println!("Devices found: {:?}", devices);

for mut device in devices {
println!("Selected HID authenticator: {}", &device);
println!("Selected HID authenticator: {}", device);
let mut channel = device.channel(ChannelSettings::default()).await?;
channel.wink(TIMEOUT).await?;

Expand Down
2 changes: 1 addition & 1 deletion libwebauthn/examples/features/prf_replay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub async fn main() -> Result<(), Box<dyn Error>> {
let challenge: [u8; 32] = thread_rng().gen();

for mut device in devices {
println!("Selected HID authenticator: {}", &device);
println!("Selected HID authenticator: {}", device);
let mut channel = device.channel(ChannelSettings::default()).await?;
channel.wink(TIMEOUT).await?;

Expand Down
2 changes: 1 addition & 1 deletion libwebauthn/examples/features/webauthn_extensions_hid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub async fn main() -> Result<(), Box<dyn Error>> {
};

for mut device in devices {
println!("Selected HID authenticator: {}", &device);
println!("Selected HID authenticator: {}", device);
let mut channel = device.channel(ChannelSettings::default()).await?;
channel.wink(TIMEOUT).await?;

Expand Down
2 changes: 1 addition & 1 deletion libwebauthn/examples/features/webauthn_prf_hid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub async fn main() -> Result<(), Box<dyn Error>> {
};

for mut device in devices {
println!("Selected HID authenticator: {}", &device);
println!("Selected HID authenticator: {}", device);
let mut channel = device.channel(ChannelSettings::default()).await?;
channel.wink(TIMEOUT).await?;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub async fn main() -> Result<(), Box<dyn Error>> {
println!("Devices found: {:?}", devices);

for mut device in devices {
println!("Selected HID authenticator: {}", &device);
println!("Selected HID authenticator: {}", device);
let mut channel = device.channel(ChannelSettings::default()).await?;
channel.wink(TIMEOUT).await?;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ pub async fn main() -> Result<(), Box<dyn Error>> {
println!("Devices found: {:?}", devices);

for mut device in devices {
println!("Selected HID authenticator: {}", &device);
println!("Selected HID authenticator: {}", device);
let mut channel = device.channel(ChannelSettings::default()).await?;
channel.wink(TIMEOUT).await?;

Expand Down
2 changes: 1 addition & 1 deletion libwebauthn/examples/management/cred_management_hid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ pub async fn main() -> Result<(), WebAuthnError<HidError>> {
println!("Devices found: {:?}", devices);

for mut device in devices {
println!("Selected HID authenticator: {}", &device);
println!("Selected HID authenticator: {}", device);
let mut channel = device.channel(ChannelSettings::default()).await?;
channel
.wink(TIMEOUT)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub async fn main() -> Result<(), WebAuthnError<HidError>> {
println!("Devices found: {:?}", devices);

for mut device in devices {
println!("Selected HID authenticator: {}", &device);
println!("Selected HID authenticator: {}", device);

// Pass the store via ChannelSettings; the channel reuses or mints a persistent
// token through it. The same settings apply to any transport.
Expand Down
2 changes: 1 addition & 1 deletion libwebauthn/src/transport/cable/known_devices.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ impl Display for CableKnownDevice {
write!(
f,
"{} ({})",
&self.device_info.name,
self.device_info.name,
hex::encode(self.device_info.public_key)
)
}
Expand Down
Loading