- Append the script's stderr (fallback stdout, capped at 500 chars) to
download/upload error messages so the actual failure reason is visible
(e.g. 'NAS share not connected: /Volumes/...').
- Sync error messages now stay visible until closed instead of
auto-hiding, so the detail can actually be read.
- Do not attempt an upload after a failed download (previously an upload
with an empty temp path was attempted, masking the real download error).
- Tests: MockRemoteProcess gains configurable exit code/error output;
new TestGui::testRemoteSyncErrorDetail.
---------
Co-authored-by: moritzthecat <[email protected]>
Co-authored-by: droidmonkey <[email protected]>
keepassxc-cli db-edit ignored the result of Database::setKey(). On a
KDBX 4 database whose key includes a challenge-response component, the
new key keeps that component, so db-edit challenged the hardware key
twice: once to transform the new key and again when saving. If the
first challenge failed, for example because the key was not touched in
time, but the second one succeeded, the database kept its old key. The
command then saved the database with the old credentials and printed
"Successfully edited the database.", although the requested password
or key file change had not been applied.
Report the failure, with the reason given by the key, and exit without
saving instead.
Challenge-response keys can now set their error, so that the mock key
used by the tests reports why a challenge failed.
* Fixes sporadic failures on gui tests on Windows
* Corrects inability to write to temporary config file while running tests
* Corrects errors when using MockRemoteProcess due to missing functions
* Provide remote database sync capability
Allow arbitrary commands to be defined and executed for syncing databases with remote services. This includes sftp, scp, rsync, etc.
Remote commands are stored per-database and sync operations are manually triggered by the user from the Database -> Remote Sync menu.
---------
Co-authored-by: Stefan Forstenlechner <[email protected]>
Co-authored-by: Jonathan White <[email protected]>
Selected the [Botan crypto library](https://github.com/randombit/botan) due to its feature list, maintainer support, availability across all deployment platforms, and ease of use. Also evaluated Crypto++ as a viable candidate, but the additional features of Botan (PKCS#11, TPM, etc) won out.
The random number generator received a backend upgrade. Botan prefers hardware-based RNG's and will provide one if available. This is transparent to KeePassXC and a significant improvement over gcrypt.
Replaced Argon2 library with built-in Botan implementation that supports i, d, and id. This requires Botan 2.11.0 or higher. Also simplified the parameter test across KDF's.
Aligned SymmetricCipher parameters with available modes. All encrypt and decrypt operations are done in-place instead of returning new objects. This allows use of secure vectors in the future with no additional overhead.
Took this opportunity to decouple KeeShare from SSH Agent. Removed leftover code from OpenSSHKey and consolidated the SSH Agent code into the same directory. Removed bcrypt and blowfish inserts since they are provided by Botan.
Additionally simplified KeeShare settings interface by removing raw certificate byte data from the user interface. KeeShare will be further refactored in a future PR.
NOTE: This PR breaks backwards compatibility with KeeShare certificates due to different RSA key storage with Botan. As a result, new "own" certificates will need to be generated and trust re-established.
Removed YKChallengeResponseKeyCLI in favor of just using the original implementation with signal/slots.
Removed TestRandom stub since it was just faking random numbers and not actually using the backend. TestRandomGenerator now uses the actual RNG.
Greatly simplified Secret Service plugin's use of crypto functions with Botan.
Many lines were not conformant with the project's formatting rules.
This patch should fix all formatting and whitespace issues in the code
base.
A clang-format directive was put around the connect() calls containing
SIGNALs and SLOTs whose signatures would be denormalized because of the
formatting rules.
This patch implements a new database wizard to guide users through the process
of setting up a new database and choosing sane encryption settings.
It also reimplements the master key settings to be more
user-friendly. Users can now add, change, or remove individual composite
key components instead of having to set all components at once. This
avoids confusion about a password being reset if the user only wants to
add a key file.
With these changes comes a major refactor of how database composite keys and key
components are handled. Copying of keys is prohibited and each key
exists only once in memory and is referenced via shared pointers. GUI
components for changing individual keys are encapsulated into separate
classes to be more reusable. The password edit and generator widgets
have also been refactored to be more reusable.