Even if the engine could live with 2.7.0, the latest libpEpTransport needs 2.7.1.
Let us use it. Also add libpEpTransport as a dependency, even if the automatic
gitlab build system does not support it yet.
Add the new rating field to the ASN.1 representation as well (I am about to
discover, in a forthcoming commit, that that is in fact a stupid decision).
Move the rating enum definition from message_api.h to pEpEngine.h in order to
make it accessible from message.h . This is temporary anyway: the new rating
engine is coming.
Remove the rating output parameter from decrypt_message. This will temporarily
break *everything*!
_update_state_for_ident_list was not always called with the same last parameter.
Add a boolean parameter to UPDATE_STATE_FOR_IDENT_LIST_AND_JUMP_ON_ERROR in
order to relay it to _update_state_for_ident_list like the original unfactored
code did. I do not fully understand this part, but did not mean to change it.
...Semantics change in decrypt_message:
After factoring the code to fit my smaller mental capacity I noticed that in
case of _status being one of PEP_PASSPHRASE_REQUIRED,
PEP_PASSPHRASE_FOR_NEW_KEYS_REQUIRED or PEP_WRONG_PASSPHRASE, encrypt_message
went to the pEp_error label but in the end returned PEP_STATUS_OK.
I assume this was not intended. Simplify further, using status in the place
of _status. Nothing seems to break.
Instead of bragging about code duplication in comments, factor.
Apart from the change in Bcc handling, this keeps the current semantics... (See
next commit)
It would be possible to install every header under src/ using a wildcard
expansion, but Volker confirms that we may want to keep internal headers which
are not installed.
All jobs were running as docker image builds inside of KVMs. Now the
first build job runs as a regular job inside the docker image generated
in the dependencies stage. This reduces the initial build jobs to around
1 minute, down from 10~ minutes.
The jobs building the docker images have been moved into their own
seperate stage which only runs if the first quick builds succeed.
Make the found array have 4 elements instead of 3.
src/GroupEncryptionTest.cc:2489:18: warning: iteration 3 invokes undefined behavior [-Waggressive-loop-optimizations]
2489 | found[i] = false;
| ~~~~~~~~~^~~~~~~
src/GroupEncryptionTest.cc:2488:23: note: within this loop
2488 | for (int i = 0; i < 4; i++)
| ~~^~~
Fix some test suite failures due to subtle interactions with the debugging
prints I forgot to remove. Add a some important comments and a few minor
cosmetic improvements.
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.