Refactor: separate GUI sources from core sources

This PR splits the GUI source files from the core source files. The immediate goal is to allow the CLI to require only a minimum number of dynamic libraries. The long term goal is to create an architectural boundary around the core module, in preparation of libkdbx.
This commit is contained in:
louib
2022-09-17 21:45:43 -04:00
committed by Jonathan White
parent 854459068f
commit 166a371050
36 changed files with 173 additions and 163 deletions

View File

@@ -23,10 +23,6 @@
#include "crypto/CryptoHash.h"
#include "crypto/Random.h"
#include "format/KeePass2RandomStream.h"
#ifdef WITH_XC_KEESHARE
#include "keeshare/KeeShare.h"
#include "keeshare/KeeShareSettings.h"
#endif
#include "streams/HmacBlockStream.h"
#include "streams/SymmetricCipherStream.h"
#include "streams/qtiocompressor.h"
@@ -232,8 +228,12 @@ KdbxXmlWriter::BinaryIdxMap Kdbx4Writer::writeAttachments(QIODevice* device, Dat
#ifdef WITH_XC_KEESHARE
// Namespace KeeShare attachments so they don't get deduplicated together with attachments
// from other databases. Prevents potential filesize side channels.
if (auto shared = KeeShare::resolveSharedGroup(entry->group())) {
hash.addData(KeeShare::referenceOf(shared).uuid.toByteArray());
auto group = entry->group();
if (!group && entry->historyOwner()) {
group = entry->historyOwner()->group();
}
if (group && group->isShared()) {
hash.addData(group->uuid().toByteArray());
} else {
hash.addData(db->uuid().toByteArray());
}