Page MenuHomePhorge

D12201.1765132172.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D12201.1765132172.diff

diff --git a/keyserver/src/utils/olm-utils.test.js b/keyserver/src/utils/olm-utils.test.js
--- a/keyserver/src/utils/olm-utils.test.js
+++ b/keyserver/src/utils/olm-utils.test.js
@@ -86,6 +86,22 @@
return aliceSession;
};
+ const createSessionWithoutOTK = (
+ aliceSession: olm.Session,
+ aliceAccount: olm.Account,
+ bobAccount: olm.Account,
+ ) => {
+ aliceSession.create_outbound_without_otk(
+ aliceAccount,
+ JSON.parse(bobAccount.identity_keys()).curve25519,
+ JSON.parse(bobAccount.identity_keys()).ed25519,
+ String(Object.values(JSON.parse(bobAccount.prekey()).curve25519)[0]),
+ String(bobAccount.prekey_signature()),
+ );
+
+ return aliceSession;
+ };
+
const testRatchet = (
aliceSession: olm.Session,
bobSession: olm.Session,
@@ -306,4 +322,16 @@
createSession(aliceSession, aliceAccount, bobAccount, false, false, true),
).toBeFalse;
});
+
+ it('should create session without one-time key', async () => {
+ await olm.init();
+ const aliceAccount = initAccount();
+ const bobAccount = initAccount();
+ const aliceSession = new olm.Session();
+ const bobSession = new olm.Session();
+
+ expect(createSessionWithoutOTK(aliceSession, aliceAccount, bobAccount))
+ .toBeTrue;
+ expect(testRatchet(aliceSession, bobSession, bobAccount, 100)).toBeTrue;
+ });
});

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 7, 6:29 PM (20 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5843539
Default Alt Text
D12201.1765132172.diff (1 KB)

Event Timeline