Page MenuHomePhabricator

[native] new method to initialize content olm session
AbandonedPublic

Authored by varun on Sep 29 2023, 11:58 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 17, 1:16 PM
Unknown Object (File)
Fri, Nov 15, 5:01 AM
Unknown Object (File)
Tue, Nov 12, 11:13 PM
Unknown Object (File)
Fri, Nov 8, 4:19 PM
Unknown Object (File)
Fri, Nov 8, 1:07 PM
Unknown Object (File)
Thu, Nov 7, 5:27 AM
Unknown Object (File)
Thu, Nov 7, 5:17 AM
Unknown Object (File)
Wed, Nov 6, 12:43 PM
Subscribers

Details

Reviewers
kamil
bartek
Summary

We need this method to intialize a content session and send the initial encrypted message to the keyserver

Depends on D9326

Test Plan

called the new method with the keys from my local keyserver. was able to create an olm session by sending these via the new auth responder later in the stack.

Diff Detail

Repository
rCOMM Comm
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

check if crypto module is initialized before calling initializeOutboundForSendingSession

kamil requested changes to this revision.Oct 2 2023, 2:37 AM

I have one question, maybe I am missing some context but I think after initializing and encrypting the initial message session should be persisted, otherwise this created session can not be used in the future. In notifications this is done via NotificationsCryptoModule::serializeAndFlushCryptoModule, because of some other limitations is done using file.
Here probably DatabaseManager::getQueryExecutor().storeOlmPersistData(); can be used.
Is it a different case and persistence is not needed?

native/cpp/CommonCpp/NativeModules/CommCoreModule.h
27

Shouldn't this be a param of initializeContentSession and in the call site somehow related to Ashoat's keyserver ID?

This revision now requires changes to proceed.Oct 2 2023, 2:37 AM

Is it a different case and persistence is not needed?

although we don't really use the content session yet after initializing it, we should persist it still. thanks for catching that.

native/cpp/CommonCpp/NativeModules/CommCoreModule.h
27

I think it's fine to use this placeholder for now. in the future, though, we'll need to make this string and the corresponding notif ID related to the keyserver owner's user ID

kamil added inline comments.
native/cpp/CommonCpp/NativeModules/CommCoreModule.h
27

got it, makes sense

This revision is now accepted and ready to land.Oct 9 2023, 12:46 AM