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)
Wed, Jul 3, 5:18 PM
Unknown Object (File)
Wed, Jul 3, 1:23 AM
Unknown Object (File)
Tue, Jul 2, 9:39 PM
Unknown Object (File)
Tue, Jul 2, 9:39 PM
Unknown Object (File)
Tue, Jul 2, 9:39 PM
Unknown Object (File)
Tue, Jul 2, 9:39 PM
Unknown Object (File)
Tue, Jul 2, 9:36 PM
Unknown Object (File)
Tue, Jul 2, 9:32 AM
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
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 ↗(On Diff #31565)

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 ↗(On Diff #31565)

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 ↗(On Diff #31565)

got it, makes sense

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