Commit Graph

1003 Commits (3095f39fec022b5de34266c6df8a48f1796460cc)

Author SHA1 Message Date
positron 3095f39fec fix ENGINE-956
It is now possible to use shell environment variables in PER_USER_DIRECTORY and
PER_MACHINE_DIRECTORY, expanded at *run* time.  This is meant to allow more
freedom to the deployment engineer, without affecting development.  Notice that,
when PER_USER_DIRECTORY and PER_MACHINE_DIRECTORY are defined in the Makefile,
dollar signs must be escaped (a dollar becomes a double dollar) because of
*make* syntax: this has nothing to do with pEp engine code.
Expansion follows the Unix shell $VARIABLE syntax: ${VARIABLE} is not supported.
See _expand_variables.

src/platform_unix.c contained some duplicated logic about caching path results
into static variables; this change set would have added to the complexity by
calling the new path expansion function, in many different places.  Seize the
occasion for factoring.

Do not change the meaning of PER_USER_DIRECTORY yet; I would like to do it,
since it is confusing and inconsistent with per_user_directory
(PER_USER_DIRECTORY is a relative path on Unix, while per_user_directory is
absolute), but the actual semantics with respect to $HOME and $PEP_HOME is
complicated and I do not want to break it.
New API function per_user_relative_directory.

Remove the ugly "reset" argument from unix_local_db (which was conditionally
defined according to NDEBUG!), used to force path re-computation in the test
suite after changing an environment variable so as to work in a new "home"
directory.  In the place of this reset argument add clear API functions to the
engine for handling the cache.
My quick grapping and IRC interaction confirm that nobody was using the
functionality out of the engine test suite.  Adapt the test suite to use the new
API.

Tentatively add caching and expansion functionality to android_system_db as well.
2 years ago
Krista Bennett 6039b10ca5 Fixed decoder generation to create decoder that fails when entire blob isn't consumed (or on other failure), indicating an illegal message 2 years ago
positron 1bd8d6c503 improve build system documentation 2 years ago
Volker Birk e7aaeb5569 adapting test to rename of PEPMessage to ASN1Message 2 years ago
Volker Birk 77e5ecb9ba add encode_PEPMessage_message() and decode_PEPMessage_message() to MapAsn1Test.check_map_asn1_message 2 years ago
Volker Birk 0999587a01 adding MapAsn1Test.check_map_asn1_message 2 years ago
Krista Bennett da99a8dd14 Removed all MIME_encrypt/decrypt functions from tests and aux_mime_msg.* from the source. App builds may need to adjust! 2 years ago
Krista Bennett e45d51242d Fixed 2.1 legacy header issue 2 years ago
Krista Bennett 425b96b701 ENGINE-944: removed some dangerous string checking assumptions. Don't know if this is the cause of the issue, but it was still incorrect. 2 years ago
Krista Bennett 628d66710a ENGINE-935: added test (EncryptSignDirectLoopTest) which can be #if'd in to the test suite to check mem leaks on encrypt_and_sign 2 years ago
Krista Bennett 124181cfec Fixed tests which broke when we changed default min version. 2 years ago
Krista Bennett 0ddd929d8a ENGINE-938: Added notifyHandshake callback and status 2 years ago
Krista Bennett 4841a14a5d Added non-matching 2.2 claim case 2 years ago
Krista Bennett 663b3a4237 Added trusted and reliable cases to ensure keys don't get clobbered 2 years ago
Krista Bennett d6231e183d ENGINE-633: test fixes - in she goes. 2 years ago
Krista Bennett 28637f77fa ENGINE-633: fixed broken one-file requirement (refactor mistake), ENGINE-811: remove blacklist.h from makefile 2 years ago
Krista Bennett bb3b817d3e ENGINE-633: test cleanup and fixes (more to come) 2 years ago
Krista Bennett 7fa5958e15 ENGINE-633: some non-pEp mail tests added 2 years ago
Krista Bennett b176506d3e ENGINE-811: Removed blacklisting. Tables won't be removed, but all statements and functions accessing them are now gone. 2 years ago
Krista Bennett efde49fb78 ENGINE-828: removed username from matching heuristics in update_identity 2 years ago
Krista Bennett 70e288cd62 Merge branch 'master' into ENGINE-633 2 years ago
Krista Bennett bbc31bf6d8 Changed From_M2_1.eml to reflect 2.1.34+ filename change 2 years ago
Krista Bennett 45b1aeff81 ENGINE-633: expected failure cases due to 2.0 changes now fail appropriately 2 years ago
Krista Bennett 8bdbe866d9 Merge branch 'master' into ENGINE-633 2 years ago
Volker Birk 2cd53655e7 publish import_key_with_fpr_return() 2 years ago
Krista Bennett 5a770088f7 ENGINE-633: converted upstream test cases - those that fail I expect to fail right now because we're fixing the spec 2 years ago
Krista Bennett 182c7572dd Merge branch 'ENGINE-633' of https://gitea.pep.foundation/pEp.foundation/pEpEngine into ENGINE-633 2 years ago
Krista Bennett bbfc9f3392 Committing to merge 2 years ago
Krista Bennett c816b8f3dd ENGINE-633: massive test refactor 2 years ago
Krista Bennett 1728de4927 Refactored default mail generation to make it more maintainable 2 years ago
Krista Bennett 6a5f270468 ENGINE-633: shut define off 2 years ago
Krista Bennett 7e93106bb6 ENGINE-633: test email generation fixes and additional test cases 2 years ago
Krista Bennett 9f1324bf75 ENGINE-633: default key import tests evolution 2 years ago
Krista Bennett 0bbb43dfd6 Downgraded the C++17 inline var to an acceptable C++14 equivalent 2 years ago
Krista Bennett 59b3d16849 A whole bunch of canonical emails generated with various target pEp versions and open PGP - intentionally broken files are in *wrong*.eml 2 years ago
Krista Bennett 52ddb9d36d Probably committing a whole lot of C++ sins, but preset was bugging me. Still not sure about that inline static object array. Will fix later. 2 years ago
Krista Bennett 46c2df4785 Refactored test_utils name. 2 years ago
Krista Bennett 4db5c9dfc7 Tests: make setting fpr an explicit choice for the new world order in preset-world 2 years ago
Krista Bennett 7ee519f457 ENGINE-928: fixed test assumptions 2 years ago
Krista Bennett c0d9704475 ENGINE-928: Ported set_comm_partner_key() from Release_2.1 2 years ago
Krista Bennett 9033abdf83 ENGINE-633: Need to commit rather than stash for reasons. Commit may not compile. Changes are on the UpdateID tests, which need a full overhaul. 2 years ago
Krista Bennett 5a5dc6f9b8 ENGINE-633: Update identity test: fixed test assumptions (set key, group 1: PEP_KEY_UNSUITABLE -> PEP_STATUS_OK) 2 years ago
Krista Bennett f7764a1ab0 ENGINE-633: Fixed old message api test assumptions 2 years ago
Krista Bennett bfdf72e8a8 ENGINE-633: Default from tests fixed as far as they go (they were clearly left incomplete, so that's next on TODO) 2 years ago
Krista Bennett d92c94f197 ENGINE-633: fixed test assumptions - Message2_1Test 2 years ago
Krista Bennett db75524d48 ENGINE-633: fixed test assumptions - MessageTwoPointOhTest 2 years ago
Krista Bennett 2ce7baab83 ENGINE-633: Fixed error with update_identity - now, if a default key is unsuitable and there is no other available key in the trust db (meaning it's been assigned as a default at some time) for this identity, we return no key, PEP_ct_key_not_found, and PEP_STATUS_OK, *not* PEP_KEY_UNSUITABLE, since there is no key returned. key-related functions will still return that status. 2 years ago
Krista Bennett de876f5fad ENGINE-633: fixed some clear bugs not in the master branch. I don't even wanna know - likely from my initial pass where I thought these were inevitable effects of key election removal. Now fixed with expected behaviours 2 years ago
Krista Bennett fc0376f3ec ENGINE-633: ElevatedAttachmentsTest update_identity assumption fixed 2 years ago
Krista Bennett ee7e277f03 ENGINE-633: Engine704Test update_identity assumption fixed 2 years ago