Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanek Bevendorff <janek@jbev.net>2020-12-10 03:28:01 +0300
committerJonathan White <support@dmapps.us>2021-01-08 06:02:43 +0300
commit23ca46c9189ba5e850540f81600709b07dee8bdb (patch)
tree6e0ad29016f2a8a5415fba14369b1791053abadf /tests/data
parent49d2b87889a926f4e7e193bada847418bd156755 (diff)
Add support for version 2 XML key files.
As discussed in #4317, the next KeePass2 release will ship with support for a new generation of XML key files which enable hash integrity checks. This patch adds support for reading and generating this new format. By default, KeePass2 now uses the .keyx extension for generated key files, which was added to KeePassXC's key generation file chooser filter. We continue to generate hashed binary key files by default, but the user can explicitly save the file with the new .keyx extension to generate an XML v2 key file (currently undocumented). When opening a database, the key file type is still determined by content negotation, so the file extension has no impact here. As an additional change, the legacy key file warnings have been improved slightly to be less confusing and more helpful.
Diffstat (limited to 'tests/data')
-rw-r--r--tests/data/FileKeyXmlV2.kdbxbin0 -> 1582 bytes
-rw-r--r--tests/data/FileKeyXmlV2.keyx12
-rw-r--r--tests/data/FileKeyXmlV2BrokenHex.kdbxbin0 -> 1550 bytes
-rw-r--r--tests/data/FileKeyXmlV2BrokenHex.keyx12
-rw-r--r--tests/data/FileKeyXmlV2HashFail.kdbxbin0 -> 1582 bytes
-rw-r--r--tests/data/FileKeyXmlV2HashFail.keyx12
6 files changed, 36 insertions, 0 deletions
diff --git a/tests/data/FileKeyXmlV2.kdbx b/tests/data/FileKeyXmlV2.kdbx
new file mode 100644
index 000000000..4b13c2ec1
--- /dev/null
+++ b/tests/data/FileKeyXmlV2.kdbx
Binary files differ
diff --git a/tests/data/FileKeyXmlV2.keyx b/tests/data/FileKeyXmlV2.keyx
new file mode 100644
index 000000000..ef38d4a89
--- /dev/null
+++ b/tests/data/FileKeyXmlV2.keyx
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<KeyFile xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <Meta>
+ <Version>2.0</Version>
+ </Meta>
+ <Key>
+ <Data Hash="FE2949B8">
+ A7007945 D07D54BA 28DF6434 1B4500FC
+ 9750DFB1 D36ADA2D 9C32DC19 4C7AB01B
+ </Data>
+ </Key>
+</KeyFile> \ No newline at end of file
diff --git a/tests/data/FileKeyXmlV2BrokenHex.kdbx b/tests/data/FileKeyXmlV2BrokenHex.kdbx
new file mode 100644
index 000000000..5a7e7355e
--- /dev/null
+++ b/tests/data/FileKeyXmlV2BrokenHex.kdbx
Binary files differ
diff --git a/tests/data/FileKeyXmlV2BrokenHex.keyx b/tests/data/FileKeyXmlV2BrokenHex.keyx
new file mode 100644
index 000000000..a52803832
--- /dev/null
+++ b/tests/data/FileKeyXmlV2BrokenHex.keyx
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<KeyFile xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <Meta>
+ <Version>2.0</Version>
+ </Meta>
+ <Key>
+ <Data Hash="FE2949B8">
+ X7007945 D07D54BA 28DF6434 1B4500FC
+ 9750DFB1 D36ADA2D 9C32DC19 4C7AB01B
+ </Data>
+ </Key>
+</KeyFile> \ No newline at end of file
diff --git a/tests/data/FileKeyXmlV2HashFail.kdbx b/tests/data/FileKeyXmlV2HashFail.kdbx
new file mode 100644
index 000000000..9044b1288
--- /dev/null
+++ b/tests/data/FileKeyXmlV2HashFail.kdbx
Binary files differ
diff --git a/tests/data/FileKeyXmlV2HashFail.keyx b/tests/data/FileKeyXmlV2HashFail.keyx
new file mode 100644
index 000000000..a52e96f18
--- /dev/null
+++ b/tests/data/FileKeyXmlV2HashFail.keyx
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<KeyFile xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <Meta>
+ <Version>2.0</Version>
+ </Meta>
+ <Key>
+ <Data Hash="FE2949B9">
+ A7007945 D07D54BA 28DF6434 1B4500FC
+ 9750DFB1 D36ADA2D 9C32DC19 4C7AB01B
+ </Data>
+ </Key>
+</KeyFile> \ No newline at end of file