Lysann Tranvouez
054f333bac
deduplicate decrypt logic in PGPAgent
2026-03-12 09:32:04 +01:00
Lysann Tranvouez
b103337083
move function to be closer to related one
2026-03-12 09:32:04 +01:00
Lysann Tranvouez
5a92b6fda7
clarify public vs private keys + make prvate key IDs available
2026-03-12 09:32:04 +01:00
Lysann Tranvouez
9e3e3d1134
remove fallback behavior
...
this logic should not be relevant anywhere
2026-03-12 09:32:04 +01:00
Lysann Tranvouez
e69e590e36
replace calls to deprecated function
...
changes PasswordStore.encrypt behavior when .gpg-id support is off
(default):
old:
* ignores passed in keyID
* encrypt with first public key in keychain (gopenPGP), or entire
keychain (ObjectivePGP)
new:
* honor passed in keyID
* encrypt with all keys in keychain
2026-03-12 09:32:04 +01:00
Lysann Tranvouez
09b0b150ce
PGPAgent can encrypt with multiple keys
2026-03-11 14:12:24 +01:00
Lysann Tranvouez
b7873e6d72
move functions around
2026-03-11 14:11:37 +01:00
Lysann Tranvouez
84eaf4ad7d
PGPInterface can encrypt with multiple keys, PGPAgent can encrypt with all keys
2026-03-11 14:11:07 +01:00
Lysann Tranvouez
8d4f3af475
decryption: GopenPGPInterface tries to identify decryption key from message metadata
...
So the system can have multiple private keys, and the caller doesn't
need to specify a specific one regardless.
Ideally: If there are several matches we could also take into account
which keys have already been unlocked (or passthrases saved in
keychain). Right now it only grabs the first match.
2026-03-11 13:41:59 +01:00
Lysann Tranvouez
2ae751044c
decryption: always request key passphrase based on key ID
2026-03-11 13:32:21 +01:00
Lysann Tranvouez
d136175d93
add detailed API tests checking how calls to PGPAgent propagate to the underlying interface
...
this is refactoring support, so that we can notice changes in how the
underlying APIs are called, and make changes intentionally when needed,
instead of accidentally.
2026-03-11 11:36:36 +01:00
Lysann Tranvouez
60999c7eab
more tests: entity fetching + erase
2026-03-09 22:56:27 +01:00
Danny Mösch
d9bd0f3014
Update SwiftLint and SwiftFormat ( #613 )
...
* Update Swift version used by SwiftFormat
* Update SwiftLint version
* Rely on new virtual 'all' rule in SwiftLint
* Enable SwiftLint rule 'direct_return' rule and fix all violations
* Enable SwiftLint rule 'shorthand_optional_binding' rule and fix all violations
* Enable SwiftLint rule 'blanket_disable_command' rule and fix all violations
2023-04-23 13:01:37 -07:00
Danny Moesch
cdedff0d4d
Use SwiftFormat version 0.49.x and enable some new rules ( #527 )
2021-12-27 17:57:11 -08:00
Danny Moesch
3f75591484
Use SwiftLint version 0.43.x
2021-03-07 16:42:08 -08:00
Danny Moesch
ad4ed9419e
Format code with SwiftFormat
2021-01-31 20:16:57 -08:00
Mingshen Sun
1e1d6f0f44
Fix passphrase issue
2021-01-07 22:35:45 -08:00
Mingshen Sun
a62792bd11
Add ignore .gpg-id switch default ON
2021-01-07 21:58:38 -08:00
Danny Moesch
49c6b25611
Use SwiftFormat version 0.47.x
2020-11-09 10:13:05 -08:00
Danny Moesch
e8389eb262
Enable SwiftLint rule 'identifier_name' and handle all violations
2020-09-20 17:25:50 -07:00
Danny Moesch
56b7b24fce
Move Crypto functionality back to passKit
2020-09-06 17:59:55 -07:00
Mingshen Sun
a92940e610
Add beta distrubution channel
2020-07-19 18:25:21 -07:00
Danny Moesch
4c2693e2c7
Name classes/structs consistently
2020-04-19 13:42:41 -07:00
Mingshen Sun
072f824158
No need to select key for encryption if there only one imported key
2020-04-18 23:21:50 -07:00
Mingshen Sun
fcc8961e46
Fix fail-safe mechanism for other decryption scenarios
2020-04-18 22:42:25 -07:00
Mingshen Sun
3e114daca1
Implement fail-safe mechanism if key id is not found
2020-04-17 23:56:14 -07:00
Mingshen Sun
0cae6af60d
Check existence of PGP keys before encrypt/decrypt
2020-04-14 20:20:16 -07:00
Mingshen Sun
eb6e854d92
Change logic of passphrass for multikeys
2020-04-13 21:23:23 -07:00
Mingshen Sun
e9c5b63c4b
Refactor logic of request PGP key passphrase
2020-04-13 21:23:23 -07:00
Mingshen Sun
b7ee00815c
Partially implement multikeys support (decryption)
2020-04-13 21:23:23 -07:00
Mingshen Sun
84b1c07f64
Update to gopengpg v2.0.0
2020-04-12 20:15:49 -07:00
Yishi Lin
e4630e950d
Init PGPAgent while getting keyID
2019-10-02 11:04:10 +08:00
Yishi Lin
e0c32003e3
Cleanup and fix the erase logic
...
Explicitly uninit PGP agent during erasing all data.
2019-10-01 00:40:37 +08:00
Yishi Lin
e332b1f3be
Do not forget pgp passphrase on decryption error #296
2019-09-30 02:05:01 +08:00
Danny Moesch
730542d5bb
Separate encryption/decryption logic for different frameworks used
2019-09-15 00:32:18 -07:00