HomePhabricator
Diffusion Comm b340906231aa

Implement JNI layer over NotificationsCryptoModule

Description

Implement JNI layer over NotificationsCryptoModule

Summary: This differential implements JNI layer over NotificationsCryptoModule, so that native Android Java code can decrypt encrypted notifications

Test Plan:

  1. Apply the following diff to CommNotificationsHandler.java: https://gist.github.com/marcinwasowicz/b90db78cb695e658ca3e2b1e1fd85c75
  2. Build the app and log in.
  3. Get cookie_id of the notifications olm session created for currently logged in android user (query db).
  4. Apply this diff to send.js file in keyserver (push directory). Remember to replace cookieID with data pulled from db in step 2.: https://gist.github.com/marcinwasowicz/873ec48a8b332c1e2324771d52e11ee0
  5. Send notification. Examine logs in Android Studio.

Example:

2023-05-18 18:03:35.098 12796-12842 COMM                    app.comm.android                     W  Encrypted sample: AwoguiD1LCV7sLJPq6lHWT5MARaNb3HEd+G/pIQzVyMqnw8QHiJAXQ0fCykph234akrN1RKigZzuDvfx4v++So74g7DoDCRLK+lMdtw06WMXuaGAAXVOOY2Ii63zLClgz7XE+me1qlWw766wN7al
2023-05-18 18:03:35.098 12796-12842 COMM                    app.comm.android                     W  Decrypted sample: This is data that is sent encrypted over the wire.

Reviewers: tomek, atul, bartek

Reviewed By: tomek

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D7861

Details

Provenance
marcinAuthored on May 18 2023, 8:54 AM
Reviewer
tomek
Differential Revision
D7861: Implement JNI layer over NotificationsCryptoModule
Parents
rCOMM587401ad762c: Send encrypted notifications to iOS devices
Branches
Unknown
Tags
Unknown