build: add qomemo dir with TODO

This commit is contained in:
vae 2021-05-11 00:12:33 +03:00
parent 9fbbe0c120
commit 04e745fad4
Signed by: vae
GPG Key ID: A9A33351400E00E5
3 changed files with 36 additions and 0 deletions

View File

@ -120,6 +120,7 @@ endif()
add_subdirectory(ui) add_subdirectory(ui)
add_subdirectory(core) add_subdirectory(core)
add_subdirectory(plugins) add_subdirectory(plugins)
add_subdirectory(qomemo)
add_subdirectory(external/simpleCrypt) add_subdirectory(external/simpleCrypt)

23
qomemo/CMakeLists.txt Normal file
View File

@ -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)

12
qomemo/TODO Normal file
View File

@ -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 <encrypted xmlns='urn:xmpp:omemo:1'> with header (key list) and payload (b64)
Receiving a message:
* Check <keys> => <key>
* Decrypt (TODO)