aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/main/res/layout/activity_git_config.xml
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-11-02 18:27:09 +0100
committerDanilo M. <danix@danix.xyz>2026-11-02 18:27:09 +0100
commit931eb40e8e4deb41edcb1c725e74586ff9f918b2 (patch)
tree3cb0348a771e8bf5a96be5b7c87d860ea5c8e61b /app/src/main/res/layout/activity_git_config.xml
parentf5ca80dfd68d915ee100bd79f4e9e2cc34362b1b (diff)
downloadHardenedPass-931eb40e8e4deb41edcb1c725e74586ff9f918b2.tar.gz
HardenedPass-931eb40e8e4deb41edcb1c725e74586ff9f918b2.zip
fix(crypto): refuse to encrypt when a .gpg-id recipient key is missing
CryptoRepository.encrypt looked up every .gpg-id recipient and dropped the ones it could not find, so an entry saved on a device that lacked one recipient's key was encrypted to the others only. With a store shared between a phone key and a smartcard key, entries created on the phone could no longer be decrypted with the smartcard alone. Fail with the lookup error instead (KeyNotFoundException names the key), so the user imports the missing public key and saves again. PasswordCreationActivity also ignored the Result of encrypt and wrote the output buffer regardless: on any encryption failure it wrote an empty .gpg file, overwriting the entry when editing, and committed it. Show the error and leave the file untouched. CryptoRepositoryTest covers both the missing-recipient failure and the all-present success path, with keys generated by PGPainless (added as an app test dependency). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'app/src/main/res/layout/activity_git_config.xml')
0 files changed, 0 insertions, 0 deletions