Commit Graph

292 Commits (6741a6c735179b8e2db38af42a102ba2b9ceb1e7)

Author SHA1 Message Date
Krista Bennett 886f8bb94a ENGINE-398:key_reset in, and compiling again. 5 years ago
Volker Birk 5eed70d884 ... 5 years ago
Volker Birk c6c73fef61 ... 5 years ago
Volker Birk dc0a6e7325 ... 5 years ago
Krista Bennett 08f096189b Put in private key check in set_own_key. 5 years ago
Krista Bennett 097b196755 ENGINE-423: partial implementation of reencrypt functionality. Stashing changes to check another bug. 5 years ago
Krista Bennett e1b33d0def ENGINE-420: fixed bug in key_reset_trust when key corresponds to an own identity (this case: public-key-only), plus test expansion and bug fixes on encrypt_message_and_add_private_key 5 years ago
Krista Bennett 503bc6ae78 Deprecated and replaced misspellings of 'compromised' and 'secret' in the API and constants. Nothing should be broken for existing implementations. 5 years ago
Krista Bennett 6fe4ffb5e9 ENGINE-409: fixed key_reset_trust 5 years ago
Volker Birk a943d520fd fixing ENGINE-404 5 years ago
Volker Birk 93ac1d3230 fixing ENGINE-403 5 years ago
Krista Bennett d8c758ca56 Fixed call to _myself in trust_personal_key (should now be set_own_key), and also made sure that when an own identity comes in but the key is public only, that it gets verified but never set as the default when being trusted. 5 years ago
Krista Bennett ec3552830e ENGINE-294: blacklisting is now only checked in identity_rating, outgoing_message_rating and encrypt_message, and then only for OpenPGP comm_types. 5 years ago
Krista Bennett c9cffaea4e ENGINE-294: basic code is in to remove blacklisting from anything but encrypt_message and outgoing_message_rating, but tests need to be extended, and have to switch to ENGINE-397 and fix that to keep the keyring clean. 5 years ago
Krista Bennett cca3499098 set_pep_user also updates all of its trust values in the DB; validate_fpr also upgrades to pEp it what it returns when there's a pep user 5 years ago
Volker Birk 51e93ea4af MSVC wants init 5 years ago
Volker Birk a18006eb3a merging 5 years ago
Volker Birk 6d76b00af0 slightly reworking initial PGP key import in case of GnuPG 5 years ago
Krista Bennett 59b9f4be61 ENGINE-394: Add case in update_identity for identities which have an address and username, where retrieved user_id is TOFU and usernames don't match 5 years ago
Volker Birk e445c7b807 SEMANTIC CHANGE in myself(): .fpr is never used; to set fpr now use set_own_key() 5 years ago
Krista Bennett 21b154008e ENGINE-DIRKSAIDSO: strdup(NULL) is bad, mmmkay? 5 years ago
Krista Bennett ec531ea126 ENGINE-354: fixed bad call to is_pep_user 5 years ago
Krista Bennett 4e9f418797 Fixes for a couple of return values adjusted in recent commits; ENGINE-354: checks now in update_identity against the user pep status field. 5 years ago
Krista Bennett c11cf1d3f0 So, uh, it turns out argument order is important. Who knew? Fixed get_identity calls which would have impacted ratings when update_identity gets called without a user_id (which means it also impacts own_identities called without an own user id or .me set) 5 years ago
Krista Bennett a6cbccf6b9 Fix for ENGINE-356 5 years ago
Krista Bennett 6577bcb2fe Added prioritisation of own ids and forgotten prioritisation of recent records, necessary for update_identity to work properly; message to self now gets green from outgoing_message_rating 5 years ago
Krista Bennett f3aa429f86 ENGINE-379 and probably other problems: was calling set_identity from within set_as_pep_user, which was called by get_trust, which is called from set_identity. So... yeah. Bad. 5 years ago
Krista Bennett 26422fbe28 ADD_TO_LOG and GOTO are now simply removed everywhere. 5 years ago
Krista Bennett bce2dc2ebc ENGINE-360 and ENGINE-373 - double free fun action. 5 years ago
Roker 29363185cf fix 3 compiler warings at once. :-) 5 years ago
Krista Bennett cfea00fcef ENGINE-360: Let's try again, shall we? Lots of fixes related to address-only identities. 5 years ago
Krista Bennett 7f28ce85f9 Fixed ENGINE-364 and some test bugs. Users now much be CERTAIN to call update_identity if they need the comm_type afte trust_personal_key (this is in accord with the API) 5 years ago
Krista Bennett 05884d0f33 ENGINE-360: I *think* this should take care of the no-username problem. 5 years ago
Krista Bennett a975ef29c3 ENGINE-250: foreign keys are now on and tests pass. Be aware that with the amount of time we may have been running with them off, there may be other execution paths that cause trouble. File bugs against any DB errors. 5 years ago
Krista Bennett 29ed86ed4b ENGINE-250: fixed some things, am screaming at others. Have overcome the 'insert or update' issue at least, probably. 5 years ago
Krista Bennett 12896c3553 Intermittent commit 5 years ago
Krista Bennett 9b5b161220 A whole horde of trust fixes (mistrust list added, tests fixed, and sneaky null string in elect key removed) 5 years ago
Krista Bennett 9696808ead shelving mistrust investigation and fixes to fry bigger fish 5 years ago
Krista Bennett 36a0d49071 ENGINE-345: fix to outgoing_message_rating - set to PEP_rating_unencrypted instead of unknown 5 years ago
Krista Bennett 5f1dc494f9 Urgh. Fixing bad merge (???) 5 years ago
Krista Bennett 6b51966b22 Removed all 2-party keysync components from engine. 5 years ago
Hernâni Marques 2794f561ae Unneeded assignment 5 years ago
Krista Bennett c550cdb776 ENGINE-254: ENGINE-266: undo function now in pEpEngine for last mistrust action 6 years ago
Edouard Tisserant b84a7282f1 ENGINE-226 identity->me => _identity_me() 6 years ago
Roker 1db08290d8 rename macro ERROR(x) into ADD_TO_LOG(x) to avoid problems on MSVC 6 years ago
Krista Bennett 05af81498a ENGINE-209: commit before travel. Updated a lot of mistakes, but need to fix a compiler error. 6 years ago
Krista Bennett 51a5b10a16 ENGINE-209: compiling again 6 years ago
Krista Bennett 4115604571 ENGINE-209: intermittent commit - need to put get_identities_by_fpr into some other files so I can finish up the clearing of the revoked key from affected identities 6 years ago
Krista Bennett c5a93381de ENGINE-209: shelving changes quickly 6 years ago
Roker e0bcddd4b6 fix b0rken merge. *sigh* 6 years ago
Roker 3fa5af32a6 merge "default" into my branch 6 years ago
Edouard Tisserant 40e6fb92ec ENGINE-183 more fixes 6 years ago
Roker 07ce93a741 merge "default" into "ENGINE-199" 6 years ago
Edouard Tisserant 3a5010ac24 ENGINE-183 remove session.use_only_own_private_keys, and add existing priv keys to own_keys table at initial startup. Also added fpr from own_keys to own_key_is_listed, influencing result of ellect_own_key. 6 years ago
Edouard Tisserant 99a13d5e71 update_identity() now takes PEP_ct_key_expired as a special case, and replaces it with actual key rating if not expired enymore. Otherwise, partner's rating with expired key was never comming back to normal, even if key was renewed. 6 years ago
Roker 499528818f add more ERROR() and GOTO() to find out why the call failed. it is in keymanagement.c :-D 6 years ago
Krista Grothoff 6e01c347d8 gpg and internal API changes for ENGINE-172 implemented and tested (no-sign); no-key not in yet 6 years ago
Roker bbe403a3bb avoid unitialized local pointer variables to reduce hard-to-find bugs 6 years ago
Krista Grothoff a7f6929b99 Removed assert, because an empty username is totally valid input from an email, and we deal with it directly in the code that follows where the assert was. 6 years ago
Edouard Tisserant 69a3d474ed ENGINE-137 (fixing side effect of optimization) update_identity: added key re-election when a key has been deleted from keyring. fixed test blacklist_accept_new_key_test using that feature 6 years ago
Volker Birk e4cfb490c6 adding license info to each file 6 years ago
Edouard Tisserant 143760e389 ENGINE-137 fix optimization of update_identity, elect_pubkey already does blacklisted key exclusion, no need to redo it here. 6 years ago
Edouard Tisserant f504dc8506 ENGINE-137 3x optimization in update_identity, though it breaks blacklist test. To be continued 6 years ago
Krista Grothoff c062591bc5 Fixed additional null username issue in update_identity 6 years ago
Edouard Tisserant ab6e55446e Prevent assertion when username is not given for own identity, and doing keygen 6 years ago
Krista Grothoff 59ad29f6f0 merged in default 6 years ago
Krista Grothoff d5e3d94e83 ENGINE-112: updated get_trust in update_identity and stopped set_identity from setting empty fprs as keypairs and trust entries 6 years ago
Edouard Tisserant 40224d7ce2 Copy-paste is bad. 6 years ago
Edouard Tisserant 857449c676 ENGINE-140 clean'up own_identities_retrieve so that available pEpEngine API returns all own identities, not only those that can be synced 6 years ago
Edouard Tisserant db4696a34a ENGINE-140 changed identities flags update policy 6 years ago
Edouard Tisserant 601a5f7ce7 ENGINE-140 #comment Added own_keys table, linking pgp_keypair to identity in case user_id = PEP_OWN_USERID.
Added related set_own_key and own_keys_retieve.
Updated set_identity, set_identity_flags and added unset_identity_flags, all doing bitwise logic to untouched keep flags accross calls.
Removed keys_retrieve_by_flag and PEP_kpf_own_key, now replaced by own_keys table.
Removed duplicated code seting _DDL_USER_VERSION in manageent DB.
Removed exists_empty_fpr_entry update_fprless_identity, and corresponding logic in set_identity()

Builds, but doesn't pass test - DO NOT USE
6 years ago
Edouard Tisserant f82c4f2c7b No more _update_indentiy() and with_myself parameter. Rather, added a _myself(), with a do_keygen parameter. Now, only explicit call to myself(), key_mistrusted(), encrypt_message(), encrypt_message_to_self() may trigger keygen, not outgoing_message_rating() or update_identity() 6 years ago
Krista Grothoff 805480adf6 ENGINE-84: fixed merge conflicts 6 years ago
Krista Grothoff c494b41aa3 ENGINE-84: merge with default 6 years ago
Edouard Tisserant f173c2d243 fixed memory leak in myself 6 years ago
Edouard Tisserant 969ac0b290 ENGINE-140: now send all keys that have been at some point used as own key _on that device_ 6 years ago
Krista Grothoff bba7e41310 ENGINE-84: fixed status TODOs. 6 years ago
Volker Birk e843fdb577 missing install files fixed 6 years ago
Krista Grothoff 7ee6f7aeec ENGINE-84: #comment now generating new keys when no usable private key is available, and not electing/selecting/attempting to use own keys as private keys where private half of the keypair is blacklisted, revoked, or missing. TODO: fix status TODOs, test more before merging back. But it's working, in general. 6 years ago
Krista Grothoff a00aca8f99 ENGINE-84: merged in default 6 years ago
Krista Grothoff 123ba933e4 ENGINE-84: working on ensuring keypairs missing private keys are not selected for encryption candidates 6 years ago
Krista Grothoff 01ea05e22e Fixed problem with null usernames coming from prepackaged mime messages in 'From' for MIME_encrypt_message 6 years ago
Krista Grothoff c6aee70900 stowing changes 6 years ago
Krista Grothoff 19f553d85a ENGINE-129: update_identity now properly returns an ID with an empty fpr string when no key can be elected because none are in the keyring 7 years ago
Edouard Tisserant 127f50303e sync: decrypt_message and myself shouldn't return sync errors except if out of memory 7 years ago
Edouard Tisserant 5b3f3cbb44 Deleted 'useless extraneous code that got pulled over from an earlier version', according to darthmama 7 years ago
Krista Grothoff 64906852a6 ENGINE-112: #comment Fixed empty fpr problems in stored identities which occurred due to blacklisting. When adding other keys, we now check to see if there is a matching identity entry which lacks an fpr and, if so, we update it instead of adding a new one. Also fixed elect_pubkey NOT to return blacklisted pubkeys. 7 years ago
Edouard Tisserant 414e24e242 deleted unused _same_fpr() causing a warning in keymanagement.c 7 years ago
Krista Grothoff 21acdf33fa Actually, the flag was correct. Sigh. 7 years ago
Krista Grothoff 7ceb9fee62 don't_use_fpr was always set to true in update_identity. Fixed. 7 years ago
Krista Grothoff 0c39fa468c include in keymanagement.c for blacklist_is_listed 7 years ago
Krista Grothoff c49a6aecb7 ENGINE-107: added ct and rating states for having no key 7 years ago
Roker 3ab3c15da6 merge "default" into "keysync" to keep them in sync 7 years ago
Krista Grothoff 1e54cadadd ENGINE-27: set_identity can be called with a null/empty fpr now per Volker. ensured it does not call blacklist_is_listed on null/empty fprs 7 years ago
Krista Grothoff 19a1b40502 ENGINE-27: set_identity can be called with a null/empty fpr now per Volker. ensured it does not call blacklist_is_listed on null/empty fprs 7 years ago
Krista Grothoff 8872288526 ENGINE-27: ensure set_identity doesn't get called in update_identity if the fpr is null 7 years ago
Krista Grothoff 7c7e80dd89 ENGINE-27: blacklist_is_listed will no longer be called with empty/null strings in update_identity (caused assert failure) 7 years ago
Krista Grothoff 224e210f7c ENGINE-96: #comment all calls renamed. Roker is checking out the semantics of the references to 'compromized' to see if they also need to be renamed to 'mistrusted' for consistency within the engine. THIS IS AN API CHANGE AND WILL BREAK ADAPTERS. 7 years ago
Krista Grothoff 399c421c5e ENGINE-27: #comment I forgot one possible blacklist case. If you still get an assertion fail, I'd appreciate capturing the error type if you can so I can follow the logic. Please pull and try again... 7 years ago
Edouard Tisserant ee8eccb069 Sync : asynchronously inject KeyGen and CannotDecrypt to fsm 7 years ago
Krista Grothoff 2e4b7f75f3 ENGINE-27: type 7 years ago
Krista Grothoff a11b7e7ee1 ENGINE-27: setting fpr to empty string, not NULL, so set_identity doesn't crash. 7 years ago
Krista Grothoff 34fa1f2a83 ENGINE-27: intermittent commit, update_identity should now never try to set or return a blacklisted key 7 years ago
Krista Grothoff acad8e0a08 ENGINE-27: update_identity no longer pays attention to the input identity's fpr, but pulls one from elect_pubkey. 7 years ago
Roker 1d2ae094b2 merge "default" into "keysync" branch 7 years ago
Edouard Tisserant 66a97e2c20 ENGINE-94 Workaround key-election not being stored in case of expired key 7 years ago
Edouard Tisserant a3804f15b9 KeyGen state injection should happen only when key have been generated... 7 years ago
Edouard Tisserant 2cf840e4e7 moved KeyGen state injection from generate_keypair() to the bottom of myself() (in case of successfull keygen), thus ensuring that new identity has been already created when starting to multicast beacons to all own identities. 7 years ago
Volker Birk ccb25c2ea6 freeing what could not be added 7 years ago
Volker Birk f6a473389c adding onomem safeguard 7 years ago
Volker Birk f233a934d6 ... 7 years ago
Volker Birk 91e5b7da91 own_identities_retrieve() bullet proof 7 years ago
Volker Birk c0f9e61b8c BUGFIX: user_id and username 7 years ago
Volker Birk b0bed36c00 own identities have me flag set 7 years ago
Volker Birk eae4c92185 adding get_own_addresses() 7 years ago
Volker Birk becce8c271 empty address allowed for myself() 7 years ago
Volker Birk be18b1c198 update_identity(): if no user_id then have a look if it is an own identity first, and if so call myself() 7 years ago
Volker Birk 97711e429c BUGFIX: user_id cropped 7 years ago
Volker Birk 309b5d4ed4 BUGFIX: user_id cropped 7 years ago
Volker Birk c8fd579fca ... 7 years ago
Volker Birk 7474af98bf adding set_identity_flags_test 7 years ago
Volker Birk ff6283c288 adding set_identity_flags() 7 years ago
Volker Birk e767049511 missing assert 7 years ago
Edouard Tisserant 87b67659c3 fix #30 : memleak in myself(): stored_identity is never freed in keymanagement.c 7 years ago
Edouard Tisserant 444cc650ac Myself() : elect another pre-existing private key if stored own identity key have been removed from GPG keyring (Outlook+GPA case) 7 years ago
Edouard Tisserant 7ec1bdf077 Moved myself() own key election to a separate function 7 years ago
Edouard Tisserant 76a01b7f9e trying to get a better key in update_identity, when existing key has been revoked 7 years ago
Edouard Tisserant 6a9f9bb0f5 fixing use_only_own_private_keys build 7 years ago
Edouard Tisserant cdc6a9d4a1 added use_only_own_private_keys (testing) 7 years ago
Edouard Tisserant ce79f22bda Test for expiry one week before it happens 7 years ago
Edouard Tisserant 438a873575 Revocation-related fixes 7 years ago
Edouard Tisserant 1b14e9b72d Myself records replaced revoked key when generating a new key to replace revoked key 7 years ago
Edouard Tisserant 7fd416a99e Attach_own_key also attach revoke for some time after revocation 7 years ago
Volker Birk d40a4dee65 no if no typo :-P 7 years ago
Volker Birk c09351c9c8 typo 7 years ago
Volker Birk ae2bd5c4a8 bugfix 7 years ago
Edouard Tisserant 12a7477ed6 Remove own_keys table, added PEP_OWN_USERID, unique person userId for any own identities and keys. 7 years ago
Volker Birk 8ce0490ab8 remove size fields of pEp_identity 7 years ago
Edouard Tisserant d5708d03a2 Own keys, now filled and used by myself() 7 years ago
Edouard Tisserant 8e953a1aa7 Own keys (SQL and accessors functions) 7 years ago
Edouard Tisserant 1f5fd47a86 Removed get_best_user, leading to unexpected behaviour when user_id is made null again, for example when corresponding app contact is deleted 7 years ago
Edouard Tisserant a926501109 Made myself() re-use already selected fpr from pre-existing identity if not explicitely given. More restriction while selecting gpg ring's key should still be enforced. 7 years ago
Edouard Tisserant c3e8184c7e Fixed Primary Key of identity table. Was (address) and know is (address, user_id). Added 'virtual' user_id (const string + address) as a side effect, in case user_id isn't given and no user have been created with same address. 7 years ago
Edouard Tisserant b96e16d1c9 Fixed infinite loop in keymanagement.c/_same_fpr(), when fingerprints are different 7 years ago
Volker Birk ab96ae5b31 delete from stringlist 7 years ago
Volker Birk 1261836024 merging 7 years ago
Edouard Tisserant 8d097207fb Comparing fingerprints now accepts spaces and upper and lower case 7 years ago
Volker Birk 9335495d8f delete key references if key is added to blacklist 7 years ago
Lars Rohwedder 7133bd5d71 remove unused MIN, fix () on EMPTYSTR macro 7 years ago
Edouard Tisserant ba77eb0409 Fixed #32 : assert(keylist) without if in keymanagement.c:238 7 years ago