Skip to content

Commit 58372f4

Browse files
authored
Merge pull request #96 from tumpaproject/feat/01092
fix: reset user pin
2 parents 4f7bbdf + 60cba8b commit 58372f4

2 files changed

Lines changed: 12 additions & 8 deletions

File tree

src-tauri/Cargo.toml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "tumpa"
3-
version = "0.10.91"
3+
version = "0.10.92"
44
description = "The Usability Minded PGP Application"
55
authors = ["Kushal Das"]
66
edition = "2021"
@@ -26,11 +26,11 @@ zeroize = "1"
2626
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
2727
# Desktop gets the full libtumpa: card (PC/SC via card-backend-pcsc) +
2828
# network (VKS upload, email verification, WKD fetch).
29-
# 0.3.2 pulls wecanencrypt 0.15.0 with the Curve25519 0x40 prefix +
29+
# 0.4.0 pulls wecanencrypt 0.16.0 with the Curve25519 0x40 prefix +
3030
# Nitrokey 3 (opcard-rs >= 1.5) ECC card upload fix, plus the
3131
# `factory_reset_card`, per-card `ident` threading, and the schema-v4
3232
# summary helpers (`list_keys_summary`, `list_all_card_keys`).
33-
libtumpa = { version = "0.3.2", default-features = false, features = ["card", "network"] }
33+
libtumpa = { version = "0.4.1", default-features = false, features = ["card", "network"] }
3434
dirs = "6"
3535

3636
# Mobile builds swap PC/SC for the external backend provider.
@@ -41,15 +41,16 @@ dirs = "6"
4141
# reqwest with native-tls via wecanencrypt, which blocks
4242
# cross-compilation.
4343
[target.'cfg(any(target_os = "android", target_os = "ios"))'.dependencies]
44-
libtumpa = { version = "0.3.2", default-features = false, features = ["card-mobile"] }
44+
libtumpa = { version = "0.4.1", default-features = false, features = ["card-mobile"] }
4545
tauri-plugin-tumpa-card = { path = "../crates/tauri-plugin-tumpa-card" }
4646
# Needed so we can hand libtumpa a Box<dyn CardBackend + Send + Sync>
4747
# from the backend provider closure we register in setup().
4848
card-backend = "0.2"
4949

5050
# Integration tests under `tests/` exercise wecanencrypt APIs directly
51-
# (predating libtumpa). Keep the dev-dep so they keep compiling. libtumpa
52-
# 0.3.2 pulls wecanencrypt 0.15.0 in as a transitive; match the version
53-
# here so cargo resolves a single copy.
51+
# (predating libtumpa). Keep the dev-dep so they keep compiling.
52+
# libtumpa 0.4.0 pulls wecanencrypt 0.16.0 in as a transitive; match
53+
# the version here so cargo resolves a single copy.
5454
[dev-dependencies]
55-
wecanencrypt = { version = "0.15.0", features = ["keystore", "card-pcsc", "network"] }
55+
wecanencrypt = { version = "0.16.1", features = ["keystore", "card-pcsc", "network"] }
56+

src-tauri/src/commands/card.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ pub fn update_card_url(url: String, admin_pin: String) -> Result<(), String> {
130130

131131
#[tauri::command]
132132
pub fn change_user_pin(admin_pin: String, new_pin: String) -> Result<(), String> {
133+
// libtumpa's `change_user_pin` issues RESET RETRY COUNTER (PW1)
134+
// after verifying the admin PIN, so it both sets the new user PIN
135+
// and unblocks PW1 when its retry counter is at 0.
133136
let admin = Pin::new(admin_pin.into_bytes());
134137
let new = Pin::new(new_pin.into_bytes());
135138
admin::change_user_pin(&admin, &new, None).map_err(|e| e.to_string())

0 commit comments

Comments
 (0)