diff --git a/CHANGELOG.md b/CHANGELOG.md index ae12709..56eb092 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased -- +- Fix signature counter to improve spec compliance: + - Set the initial signature counter to 1. ## [v0.4.0-rc.1](https://github.com/trussed-dev/fido-authenticator/releases/tag/v0.4.0-rc.1) (2026-05-29) diff --git a/src/state.rs b/src/state.rs index 2de732b..a10a7ef 100644 --- a/src/state.rs +++ b/src/state.rs @@ -320,7 +320,9 @@ impl PersistentState { consecutive_pin_mismatches: 0, pin_hash: None, pin_code_point_length: 0, - timestamp: 0, + // Setting the signature counter to zero indicates that it is not supported or that a + // counter error occured, so we have to initialize it with a non-zero value. + timestamp: 1, min_pin_length: 0, min_pin_length_rp_ids: Vec::new(), force_pin_change: false,