Skip to content

Commit 1fd36a4

Browse files
Add kwallet-parser and kwallet-cli
Implements a read-only parser for KWallet file format (.kwl) supporting both legacy (Blowfish-ECB + SHA1) and modern (Blowfish-CBC + PBKDF2-SHA512) formats. Includes a CLI tool for reading and exporting wallet contents as JSON. This enables server-side auto-migration of KWallet keyring files to oo7-daemon format, similar to existing v0 format migration. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 6dfc559 commit 1fd36a4

24 files changed

Lines changed: 1638 additions & 24 deletions

.github/workflows/CI.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ jobs:
3939
run: |
4040
cargo build --manifest-path ./cli/Cargo.toml
4141
42+
- name: Build kwallet-parser
43+
run: |
44+
cargo build --manifest-path ./kwallet-parser/Cargo.toml --features serde
45+
46+
- name: Build kwallet-cli
47+
run: |
48+
cargo build --manifest-path ./kwallet-cli/Cargo.toml
49+
4250
- name: Build Server (native)
4351
run: |
4452
cargo build --manifest-path ./server/Cargo.toml
@@ -85,6 +93,10 @@ jobs:
8593
run: |
8694
cargo test --manifest-path ./server/Cargo.toml --no-default-features --features openssl_crypto
8795
96+
- name: Test kwallet-parser
97+
run: |
98+
cargo test --manifest-path ./kwallet-parser/Cargo.toml --features serde
99+
88100
cargo-deny:
89101
runs-on: ubuntu-latest
90102
steps:

Cargo.lock

Lines changed: 121 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ members = [
55
"cargo-credential",
66
"client",
77
"cli",
8+
"kwallet-cli",
9+
"kwallet-parser",
810
"macros",
911
"pam",
1012
"portal",

coverage.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ grcov coverage-raw/combined.info \
5858
--ignore "**/pam/*" \
5959
--ignore "**/tests/*" \
6060
--ignore "**/examples/*" \
61+
--ignore "**/kwallet-cli/*" \
62+
--ignore "**/kwallet-parser/*" \
6163
--ignore "**/target/*" \
6264
--ignore "**/error.rs"
6365

@@ -75,6 +77,8 @@ grcov coverage-raw/combined.info \
7577
--ignore "**/pam/*" \
7678
--ignore "**/tests/*" \
7779
--ignore "**/examples/*" \
80+
--ignore "**/kwallet-cli/*" \
81+
--ignore "**/kwallet-parser/*" \
7882
--ignore "**/target/*" \
7983
--ignore "**/error.rs"
8084

deny.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,6 @@ multiple-versions = "deny"
2727
wildcards = "deny"
2828
highlight = "all"
2929
skip = [
30+
{ name = "rand_core" },
31+
{ name = "winnow" },
3032
]

kwallet-cli/Cargo.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[package]
2+
name = "kwallet-cli"
3+
description = "CLI tool for reading KWallet files"
4+
version.workspace = true
5+
edition.workspace = true
6+
authors.workspace = true
7+
repository.workspace = true
8+
homepage.workspace = true
9+
license.workspace = true
10+
rust-version.workspace = true
11+
12+
[dependencies]
13+
kwallet-parser = { version = "0.6.0-alpha", path = "../kwallet-parser", features = ["serde"] }
14+
clap = { workspace = true }
15+
serde = { workspace = true }
16+
serde_json = "1.0"
17+
rpassword = "7.3"

0 commit comments

Comments
 (0)