diff --git a/CMakeLists.txt b/CMakeLists.txt index 7193a6f..930ae45 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,6 +120,7 @@ endif() add_subdirectory(ui) add_subdirectory(core) add_subdirectory(plugins) +add_subdirectory(qomemo) add_subdirectory(external/simpleCrypt) diff --git a/qomemo/CMakeLists.txt b/qomemo/CMakeLists.txt new file mode 100644 index 0000000..5f92df4 --- /dev/null +++ b/qomemo/CMakeLists.txt @@ -0,0 +1,23 @@ +cmake_minimum_required(VERSION 3.3) +project(qomemo) + +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake") +set(CMAKE_AUTOMOC ON) + +find_package(Qt5Core CONFIG REQUIRED) +find_package(Qt5Xml CONFIG REQUIRED) +find_package(LMDB REQUIRED) + +set(qomemo_SRC) + +add_library(qomemo STATIC ${qomemo_SRC}) + +if(SYSTEM_QXMPP) + get_target_property(QXMPP_INTERFACE_INCLUDE_DIRECTORIES QXmpp::QXmpp INTERFACE_INCLUDE_DIRECTORIES) + target_include_directories(qomemo PUBLIC ${QXMPP_INTERFACE_INCLUDE_DIRECTORIES}) +endif() + +target_link_libraries(qomemo Qt5::Core) +target_link_libraries(qomemo Qt5::Xml) +target_link_libraries(qomemo qxmpp) +target_link_libraries(qomemo lmdb) diff --git a/qomemo/TODO b/qomemo/TODO new file mode 100644 index 0000000..6a5709d --- /dev/null +++ b/qomemo/TODO @@ -0,0 +1,12 @@ +* Generate device w/ keys +* PubSub set urn:xmpp:omemo:1:devices to announce new device +* PubSub set urn:xmpp:omemo:1:bundles to announce new key bundles +* PubSub get urn:xmpp:omemo:1:bundles to get user bundles + +Sending a message: +* Create urn:xmpp:sce:0 with padding and content +* Add with header (key list) and payload (b64) + +Receiving a message: +* Check => +* Decrypt (TODO) \ No newline at end of file