Timothy Redaelli
a01607e869
Add support for Twofish in KeePass2 code
2017-01-28 17:53:11 +01:00
Aleix Pol
bb8b91a100
Fix build with newer Qt5
2017-01-25 13:28:33 +01:00
Janek Bevendorff
e17576a6f7
Merge branch 'develop' into feature/yubikey
2017-01-15 03:20:21 +02:00
Josh Soref
af8e770106
spelling: successfully
2017-01-14 20:13:42 +01:00
Josh Soref
10f03795f9
spelling: transform
2017-01-14 20:13:34 +01:00
Josh Soref
d988b9e6d2
spelling: characters
2017-01-14 17:31:38 +01:00
Kyle Manna
77cc99acd3
YubiKey: Clean-up master seed challenge
...
* Tweak the logic so it more closely resembles other code (i.e.
trasnformKey()). Matches existing style better.
* Save the challengeResponseKey in the database structure so that
it can be referred to later (i.e. database unlocking).
Signed-off-by: Kyle Manna <kyle@kylemanna.com>
2017-01-08 16:47:39 -08:00
Kyle Manna
faa055010f
challenge: Propagate failed challenge to caller
...
* If a removed Yubikey is to blame, re-inserting the Yubikey won't
resolve the issue. Hot plug isn't supported at this point.
* The caller should detect the error and cancel the database write.
Signed-off-by: Kyle Manna <kyle@kylemanna.com>
2017-01-08 16:40:25 -08:00
Kyle Manna
add4846d79
format: Add challenge response result to final key hash
...
* The challengeMasterSeed() function return empty if not present
maintaining backwards compatability.
* This commit is where the challenge response result is computed into
the final key used to encrypt or decrypt the database.
Signed-off-by: Kyle Manna <kyle@kylemanna.com>
2017-01-07 23:18:55 -08:00
Felix Geyer
fff9e7ac46
Convert Q_FOREACH loops to C++11 for loops.
...
Q_FOREACH will de deprecated soon.
2016-10-02 21:45:55 -04:00
Felix Geyer
c78822f6e6
Merge branch '2.0'
2016-10-02 21:45:54 -04:00
Felix Geyer
ba68e0a4a1
Show proper error message when key is wrong for .kdb files.
2016-09-29 22:08:20 -04:00
Felix Geyer
8a7e98820a
Fix typo.
...
# Conflicts:
# src/format/KeePass2Reader.cpp
2016-09-29 22:08:10 -04:00
Florian Geyer
8d16522d39
Repair UUID of inconsistent history items.
...
Closes #130
2016-08-03 23:48:40 +02:00
Felix Geyer
57c1a0f4b6
Show proper error message when key is wrong for .kdb files.
2016-04-09 16:09:53 +02:00
Felix Geyer
bde4d63fdb
Fix typo.
2016-04-09 16:02:49 +02:00
Felix Geyer
d6d92ce90a
Merge branch '2.0'
2016-02-08 18:13:29 +01:00
Felix Geyer
208b803fbe
Fix KeePass2Repair to retain multi-byte UTF-8 chars.
...
Since char is (often) unsigned the ch < 0x20 check matched all
multi-byte encoded UTF-8 chars.
2016-02-02 00:41:16 +01:00
Felix Geyer
8a92cec03f
Keep valid surrogate pairs in stripInvalidXml10Chars().
2016-02-02 00:38:58 +01:00
Felix Geyer
107c0673c7
Make sure we don't write negative icon ids into the database.
2016-01-31 17:06:51 +01:00
Felix Geyer
c14d04b3e8
Fix crash when icon id is larger than INT_MAX.
...
In these cases icon id was interpreted as a negative number.
The QList access with a negative index resulted in a crash.
2016-01-31 16:44:34 +01:00
Felix Geyer
bfae81ec70
Use C++11 keyword directly in new methods.
2016-01-29 17:25:32 +01:00
Felix Geyer
71d4cb781d
Merge branch '2.0'
2016-01-29 17:22:37 +01:00
Felix Geyer
eb56bd8973
Add repair functionality to strip invalid XML chars.
...
Refs #392
2016-01-28 23:07:04 +01:00
Felix Geyer
2d741afe3e
Strip invalid XML chars when writing databases.
...
These characters are unprintable or just plain invalid.
QXmlStreamReader throws and error when reading XML documents with such chars.
Closes #392
2016-01-24 17:20:16 +01:00
Felix Geyer
6e45cf0dab
Use C++11 keywords directly.
2015-10-11 10:47:30 +02:00
Felix Geyer
3b2a39fd38
Merge branch '2.0'
2015-09-26 11:44:27 +02:00
Felix Geyer
54f44f5267
Show a better message when trying to open an old database format.
...
Refs #338
2015-09-23 23:16:49 +02:00
Felix Geyer
7fa0eddc5f
Make C++11 mandatory.
2015-09-12 13:55:50 +02:00
Felix Geyer
20b13a4a2e
Ger rid of last Qt 4 version check.
2015-09-12 13:51:49 +02:00
Felix Geyer
9882f16614
Remove Tools::currentDateTimeUtc().
2015-09-12 13:51:49 +02:00
Felix Geyer
0422943d52
Explicitly close/reset streams so we can detect errors.
2015-07-20 21:35:48 +02:00
Felix Geyer
0024f2e30f
Signal errors in QXmlStreamWriter upstream.
...
Unfortunately the method is only avaiable in Qt >= 4.8.
Not much we can do about that.
2015-07-20 21:35:43 +02:00
Felix Geyer
ceb6a0383e
Add ability to export databases to CSV files.
...
Based on implementation by Florian Geyer <blueice@fobos.de>
Closes #57
2015-07-14 22:14:34 +02:00
Felix Geyer
c6105a08ab
KeePass2XmlReader: Don't fail wheh nreading empty UUIDs.
...
Closes #298
2015-07-13 21:01:55 +02:00
Felix Geyer
7a2c02f0df
Initialize some instance variables in ctor.
...
Discovered by Coverity.
Most likely doesn't fix any actual bug but better be safe.
2015-05-14 16:58:53 +02:00
Felix Geyer
f6243675c9
Warn if result of processInPlace() is unchecked.
...
Fix callers accordingly.
2015-05-09 23:21:50 +02:00
Felix Geyer
a762cef0a9
Catch and handle all errors from libgcrypt.
2015-05-09 23:21:44 +02:00
dartraiden
3fca61dc24
spelling correction, fixed typos
2015-05-06 19:38:43 +03:00
Felix Geyer
eb22f0a2d8
Raise an error when parsing duplicate attributes/attachments.
2014-12-03 23:36:53 +01:00
Felix Geyer
71d39865b3
Introduce a strict mode in KeePass2XmlReader.
...
Many errors are now ignored when not in strict mode so we can still parse
files that have been written by broken/incomplete implementations.
2014-12-01 21:52:51 +01:00
Ben Boeckel
66b3d22041
Use QString::toLatin1() rather than ::toAscii()
...
The toAscii (and fromAscii) are removed from Qt5 in favor of Latin1.
2013-11-24 21:19:20 +01:00
Felix Geyer
9c788a6e84
Support custom backends in Random.
...
Useful for tests.
2013-10-09 22:06:32 +02:00
Felix Geyer
6504b6f2bd
Drop Qt module name from include statements.
...
This is a preparation to be able to build KeePassX against Qt 5.
2013-10-03 15:18:16 +02:00
Felix Geyer
5c84aa308d
Improve error messages for reading and wriiting databases.
...
Closes #7
2013-06-30 14:43:02 +02:00
Felix Geyer
db6ac26794
Initialize variables to silence compiler warnings.
2013-05-01 12:03:03 +02:00
Felix Geyer
6df30df992
Really fix parsing when the db contains two Root (Group) elements.
2013-04-30 17:04:54 +02:00
Felix Geyer
0ec29b2354
Raise error if we don't find exactly one root group.
2013-04-29 22:31:50 +02:00
Felix Geyer
e16720d06d
When parsing make sure that databases contain at least the root group.
2013-04-29 22:31:50 +02:00
Felix Geyer
3be7fa6b3b
Raise error when required xml elements are missing.
2013-04-29 22:31:50 +02:00
Felix Geyer
d182586557
Make sure KeePass1Reader::key() isn't used before the variables are set.
2013-04-29 22:31:50 +02:00
Felix Geyer
1f5564760f
Make sure groupId and groupLevel are set in KeePass1Reader::readGroup().
2013-04-29 22:31:50 +02:00
Felix Geyer
7a89510916
Make more key/value-type functions safe against reordered xml elements.
2013-04-29 22:31:50 +02:00
Felix Geyer
5588792344
Make KeePass2XmlReader::parseGroup() safe against reordered xml elements.
2013-04-29 22:31:50 +02:00
Felix Geyer
3acb33e05a
Make KeePass2XmlReader::parseEntry() safe against reordered xml elements.
2013-04-29 22:31:50 +02:00
Felix Geyer
3658a65380
Use Q_NULLPTR instead of 0.
2013-04-29 22:31:49 +02:00
Felix Geyer
f1719cfc5f
Small optimizations.
2012-10-28 11:27:10 +01:00
Florian Geyer
f5eafe6522
Assert that the tmp group has no children when import is finished.
2012-10-28 10:25:43 +01:00
Andreas Piesk
00908856c3
don't abort import if there are entries with invalid groups,
...
log it and assign them to the root-group
2012-10-28 09:36:27 +01:00
Felix Geyer
78c125af4e
Check if all required database headers were present.
2012-10-12 12:09:22 +02:00
Felix Geyer
18d3fe55f8
Add support for database format 3.01 (HeaderHash).
...
Add test for the format 3.00 and upgrade Compressed.kdbx, NonAscii.kdbx
and ProtectedStrings.kdbx to 3.01.
Add a test for an incorrect HeaderHash.
2012-09-25 22:33:36 +02:00
Felix Geyer
ecea101962
Return Q_NULLPTR instead of 0 when the return type is a pointer.
2012-07-23 14:58:57 +02:00
Felix Geyer
fcc936ceff
Disable searching and auto-type for the Backup group imported from KeePass1.
2012-07-23 13:21:17 +02:00
Felix Geyer
9a2aba56fc
Set name of the root group when importing KeePass 1 databases.
2012-07-21 22:21:49 +02:00
Felix Geyer
b6d9c2e486
Import Auto-Type associations in KeePass1Reader.
2012-07-19 23:21:12 +02:00
Felix Geyer
f98d834edb
Move Auto-Type associations handling from Entry into an own class.
2012-07-16 09:54:04 +02:00
Felix Geyer
4b6cae0fcd
Fix some compiler warnings.
...
Implements parts of
https://gitorious.org/keepassx/keepassx/merge_requests/18
2012-07-08 11:27:11 +02:00
Felix Geyer
d826ae5daf
Add assert to make sure the temp file could be opened successfully.
2012-07-03 12:39:03 +02:00
Felix Geyer
baa5a74ba0
Convert iconCount() and expiredIconIndex() to constants.
2012-06-29 15:22:43 +02:00
Felix Geyer
68155e8f89
Make use of Q_NULLPTR.
2012-06-29 14:15:16 +02:00
Felix Geyer
d0016bf6c4
Fix reading non-ASCII passwords that are protected.
...
Closes #28
2012-06-24 18:22:18 +02:00
Felix Geyer
38d2b124d8
Fix datetime serialization appending two 'Z' at the end with Qt >= 4.8.
2012-06-24 11:25:06 +02:00
Felix Geyer
513ba6d19d
Write empty strings as short empty XML elements.
...
For example instead of
<DatabaseName></DatabaseName>
we now write
<DatabaseName/>
Closes #29
2012-06-23 20:15:14 +02:00
Felix Geyer
5297722ede
Include header cleanup.
2012-05-20 23:08:23 +02:00
Felix Geyer
f8bea82ce8
Emit error on invalid HistoryMaxItems and HistoryMaxSize values.
2012-05-19 15:05:07 +02:00
Felix Geyer
a407e0082b
Coding style improvements.
2012-05-14 19:10:42 +02:00
Felix Geyer
924130e0fe
Use Q_FOREACH instead of QListIterator.
2012-05-14 17:56:43 +02:00
Florian Geyer
a57e8f9864
Preserve order of custom icons.
...
Closes #25
2012-05-13 20:50:41 +02:00
Felix Geyer
af726d465d
Fix typo.
2012-05-13 13:33:55 +02:00
Felix Geyer
23792eb069
Remove some asserts in KeePass1Reader.
2012-05-13 13:32:28 +02:00
Felix Geyer
05c41c083e
Implement GUI to import KeePass 1 databases.
...
Closes #2
2012-05-12 10:13:00 +02:00
Felix Geyer
587a647c11
New TODO comment style.
...
Qt Creator 2.5 is able to parse those.
2012-05-11 12:39:06 +02:00
Felix Geyer
65bdc207b7
Make sure we don't create DeletedObjects when importing databases.
2012-05-10 22:54:26 +02:00
Felix Geyer
366d8a0f0e
Set master key after reading the database.
2012-05-10 22:46:36 +02:00
Felix Geyer
9d8e276950
Set uuids for entries.
2012-05-10 21:35:26 +02:00
Felix Geyer
cf4e574c50
Support Twofish encrypted KeePass 1 databases.
...
Refs #2
2012-05-10 21:06:33 +02:00
Felix Geyer
c02b5abc6e
Fix composite keys in KeePass1Reader.
2012-05-10 19:33:49 +02:00
Felix Geyer
7fd8154ea8
Add support for parsing KeePass 1 keyfiles.
...
Refs #2
2012-05-10 19:33:16 +02:00
Felix Geyer
65f2790170
Parse KeePass 1 database meta streams.
...
Refs #2
2012-05-10 11:44:25 +02:00
Felix Geyer
79b15e2ac6
Implement support for parsing groups and entries from KeePass 1 databases.
...
Still missing:
- Key files.
- Twofish encryption.
Refs #2
2012-05-09 23:16:32 +02:00
Felix Geyer
ebce183925
Start implementing support for reading KeePass 1 databases.
...
For now only decrypting the database works.
Still missing:
- Actually parsing the database.
- Key files.
Refs #1
2012-05-08 22:06:12 +02:00
Felix Geyer
739f4d97a6
Coding style fixes.
2012-05-02 17:04:03 +02:00
Felix Geyer
f89ffa10e6
Add Tools::readAllFromDevice().
...
Make KeePass2XmlReader::readCompressedBinary() use the new function.
2012-05-02 11:06:24 +02:00
Felix Geyer
3df2ad35cb
Constification and some style fixes.
2012-04-23 21:09:01 +02:00
Felix Geyer
f28f868671
Coding style fixes.
2012-04-23 17:02:09 +02:00
Felix Geyer
67bf8e7b2a
Write history only for entries that are not history items.
2012-04-22 22:33:14 +02:00
Felix Geyer
baed7d76cf
Use QHash for temporary entry/group containers.
...
Closes #11
2012-04-22 12:30:38 +02:00
Felix Geyer
8acd6f74d8
Support KeePass format 3.00 (used by KeePass2 >= 2.15).
...
Closes #6
Attachments are now stored in a pool under Metadata instead of in entries.
The protected flag of attachments isn't supported anymore.
New metadata attributes: color, historyMaxItems and historyMaxSize.
Dropped metadata attribute: autoEnableVisualHiding.
2012-04-21 16:45:46 +02:00
Felix Geyer
2e011d5362
Improve code style.
2012-04-18 22:08:22 +02:00
Florian Geyer
e1632e8087
Disable timeinfo update for history entries on database parsing.
2012-04-18 17:03:57 +02:00