Commit Graph

321 Commits (master)

Author SHA1 Message Date
Nicolas Fella 9bdbfa0df4 Try to fix Android build 2020-04-18 16:01:02 +02:00
Johan Ouwerkerk f04b15340f Fix TODO items about logging for C++ code 2020-04-14 19:45:29 +02:00
Johan Ouwerkerk b4dada08d8 Add convenient macros to set up logging for Keymsith 2020-04-14 19:39:13 +02:00
Johan Ouwerkerk ecf3476faa Fix up outdated token length validation
Keysmith can generate up to 10 digit HOTP/TOTP tokens and with this change
token length validation also permits it.
2020-04-11 21:46:19 +02:00
Johan Ouwerkerk 567d9c3c97 Do not reuse QML account entry UI delegates.
Delegate recycling causes a bug when removing an account and then adding
it back: the old, stale UI for the account is reused instead of a new one.

In combination with 'alive' guard property on the UI for account entries,
this results in the account entry becoming frozen in the old stale state.
(Incorrect helath indicators, tokens that do not update and buttons that no
longer respond anymore.)
2020-04-10 14:11:12 +02:00
Johan Ouwerkerk 438e341000 Avoid operations on a possibly expired account object.
After triggering the removal of an account from storage in the UI, it may
be possible for the UI not to fully reflect this change for a while yet.
During this short time window, it is possible for an operation to occur on
an already deleted account object which is a use-after-free bug.

In particular signals from animations and timers in the QML UI might still
trigger which causes a slot to be invoked that accesses the underlying
account object.

This change introduces a guard property called 'alive' which is flipped
when the account removal operation is triggered. Slots are updated to
check for the alive status of the UI before proceeding with other logic.
2020-04-10 14:10:47 +02:00
Johan Ouwerkerk b451bd2556 Fix up licensing for REUSE compliance.
This adds licensing and copyright information where missing and normalises
existing licensing/copyright statements to SPDX metadata tags.
2020-04-10 13:34:31 +02:00
Johan Ouwerkerk 41d94024c2 Add basic clipboard support for copying tokens 2020-04-04 11:35:43 +02:00
Johan Ouwerkerk 1a1c531dd3 Boyscout: fix a few compiler warnings about unused variables 2020-04-04 11:25:37 +02:00
Johan Ouwerkerk a23e5473a6 UI updates: prevent "invalid" accounts, better secret UI.
With this change the "Add" button in the "Add account" page is not enabled
until the entered account name and details are valid. Additionally, the UI
for entering the token secret now uses a password field with appropriate
hints for input methods.
2020-04-04 11:24:26 +02:00
Johan Ouwerkerk 768ccdba97 Refactor and update input validation
This change fixes input validation for the following cases:

 - Check that entered account names are still available
 - Working validation for time steps (input mask was completely broken)
 - Allow longer tokens: liboath is no longer used, Keysmith can handle it

Additionally the QML code is refactored significantly:

 - Extracted the main accounts overview page
 - Extracted the add an account page
 - Completed the internal renaming of "Oath" to "Keysmith" for QML types
2020-04-04 11:22:15 +02:00
Johan Ouwerkerk 2a9c80fff5 Add a custom validator that checks if the name is still available. 2020-04-04 10:51:39 +02:00
Johan Ouwerkerk 28454721df Do not fix up input during validation
This change is a workaround for behaviour of QML controls: when fixup is
called during input validation, the `acceptableInput` property is not
updated correctly.
2020-04-04 10:50:52 +02:00
Volker Krause 82a4fcce5f Adapt Android manifest to Qt 5.14 2020-03-05 21:02:24 +01:00
Johan Ouwerkerk 19f457960e Fixup: comment about minimum HOTP token lengths. 2020-02-18 19:53:09 +01:00
Johan Ouwerkerk 8b3fd592b7 Fix: always call endGroup()
Make sure to call endGroup() even if the account is rejected before
moving on to examine the next (possible) account.
2020-02-18 19:49:45 +01:00
Johan Ouwerkerk 6a06a2f5f0 Fixup HMAC key size sanity checking.
Key lengths should be checked against the output size of the hashing
algorithm (instead of block size, which was used previously).
2020-02-17 07:08:09 +00:00
l10n daemon script eb99b2abf6 GIT_SILENT made messages (after extraction) 2020-02-16 02:57:36 +01:00
Yuri Chornoivan 112b4bdf8b Fix minor typos 2020-02-13 20:27:57 +02:00
Nicolas Fella ce1b5e8db4 [android] bundle icons 2020-02-12 22:18:26 +01:00
Nicolas Fella bf8ae38fcf [android] Add app icon 2020-02-12 22:09:19 +01:00
Nicolas Fella 7c8f6a4ee1 Add AndroidManifest 2020-02-08 18:34:56 +01:00
Johan Ouwerkerk 0cc2fbc98e Fixup: signedness in comparison. 2020-02-08 17:10:17 +01:00
Bhushan Shah ec8838aa04 cmake: change the required cmake version to 3.10
This builds fine with cmake 3.10.X
2020-02-08 21:33:46 +05:30
Johan Ouwerkerk e5929e7dd5 Fixups for the flatpak build 2020-02-08 16:54:52 +01:00
Johan Ouwerkerk 8bd765e385 Remove the dependency on oath-toolkit.
This resolves issue #9.
2020-02-08 14:46:55 +01:00
Johan Ouwerkerk f950526f8b Port HOTP/TOTP algorithms away from oath-toolkit. 2020-02-08 14:46:55 +01:00
Johan Ouwerkerk 8729b92b8b Provide a custom HOTP/TOTP primitives.
Provides a building block for re-implementing the HOTP/TOTP algorithms
without using oath-toolkit: see issue #9.
2020-02-08 14:46:55 +01:00
Johan Ouwerkerk 2fe3eb8083 Provide a custom HMAC implementation
Provide a building block towards re-implementing the HOTP/TOTP
algorithms without using oath-toolkit: see issue #9.

The hmac::compute function trades simplicity (having to pre-allocate
a scratch buffer) for avoding accidental leaks of key material
(security).

This particular trade-off will help with resolving issue #6.
2020-02-08 14:21:45 +01:00
Johan Ouwerkerk 26d6d62cbe Validate that an account secret is valid base32. 2020-02-08 14:21:45 +01:00
Johan Ouwerkerk ea81dafb8e Port base32 decoding away from liboath
Provide a custom base32 implementation; relates to issues: #9 and #6.

In particular being able to control memory allocation prior to
decoding base32 will help with resolving issue #6 in a (more) secure
fashion.
2020-02-08 14:21:45 +01:00
l10n daemon script bf5dba5b58 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-02-04 06:03:03 +01:00
l10n daemon script c9415736b0 GIT_SILENT made messages (after extraction) 2020-02-04 02:51:39 +01:00
l10n daemon script 0c96f0c445 GIT_SILENT made messages (after extraction) 2020-01-30 02:48:05 +01:00
Johan Ouwerkerk f9a726fb7a Improve appdata XML metadata
Add provides, categories, and project group.
Based on the example set by KTrip.
2020-01-29 23:27:22 +00:00
Johan Ouwerkerk 771ebccab5 Fixup reference error 2020-01-29 19:40:01 +01:00
Carl Schwan cad3d9bd5c Adding utility category to desktop file 2020-01-29 17:45:34 +00:00
Johan Ouwerkerk 6ae5f7be21 Rework main page UX:
- Get rid of cards in favour of a more plain list view
 - Implement removing (deleting) accounts
2020-01-28 17:56:39 +01:00
Johan Ouwerkerk a0caf83da2 Use the new Account models.
Drop the AccountDetailsPage instead of trying to update it: see issue #7

With this change issue #2 should be fixed
2020-01-28 06:49:06 +00:00
Johan Ouwerkerk 1f15fb6e08 Introduce an 'application context' (sub)module for Keysmtih.
This module is meant to simplify consumption of various Keysmith objects in QML by not having to expose/manage all C++ dependencies.
2020-01-28 06:49:06 +00:00
Johan Ouwerkerk a813810dfe Rewrite Account model(s) as a separate (sub)module within Keysmith, layered on top of the new Account (storage) module.
This fixes the model part in issue #2
2020-01-28 06:49:06 +00:00
Johan Ouwerkerk 0d5b792637 Rewrite Account (storage) management as a separate (sub)module within Keysmtih
This provides the ground work to finally fix issue #2
2020-01-28 06:49:06 +00:00
Johan Ouwerkerk 992d52ddba Licensing/REUSE: add a copy of the GPLv3 (or later) license text 2020-01-28 06:49:06 +00:00
l10n daemon script c46f8e2e75 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-01-28 05:37:05 +01:00
Yuri Chornoivan 6fada16de7 Fix minor EBN issues 2020-01-24 20:44:47 +02:00
l10n daemon script b7d2c92683 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-01-10 05:51:23 +01:00
l10n daemon script c1dad59a40 GIT_SILENT made messages (after extraction) 2020-01-10 03:20:14 +01:00
l10n daemon script f2da5f98f3 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-01-09 05:47:13 +01:00
Johan Ouwerkerk 40a5491026 Remove application title property binding: it is redundant and causes QML warnings at runtime. 2019-12-31 18:20:58 +01:00
Bhushan Shah 78240a9efb
Rename binary to keysmith
org.kde prefix is definitely unusual so get rid of it.
2019-12-31 20:04:35 +05:30