@wireapp/core 32.1.3 → 33.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
"./src/main/cryptography/AssetCryptography/crypto.node": "./src/main/cryptography/AssetCryptography/crypto.browser.js"
|
|
4
4
|
},
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@wireapp/api-client": "^20.
|
|
7
|
-
"@wireapp/commons": "^4.4.
|
|
6
|
+
"@wireapp/api-client": "^20.7.0",
|
|
7
|
+
"@wireapp/commons": "^4.4.9",
|
|
8
8
|
"@wireapp/core-crypto": "0.5.2",
|
|
9
9
|
"@wireapp/cryptobox": "12.8.0",
|
|
10
|
-
"@wireapp/promise-queue": "^1.3.
|
|
11
|
-
"@wireapp/protocol-messaging": "1.
|
|
12
|
-
"@wireapp/store-engine-dexie": "^1.7.
|
|
10
|
+
"@wireapp/promise-queue": "^1.3.3",
|
|
11
|
+
"@wireapp/protocol-messaging": "1.39.0",
|
|
12
|
+
"@wireapp/store-engine-dexie": "^1.7.9",
|
|
13
13
|
"axios": "^0.27.2",
|
|
14
|
-
"bazinga64": "5.11.
|
|
14
|
+
"bazinga64": "5.11.9",
|
|
15
15
|
"hash.js": "1.1.7",
|
|
16
16
|
"http-status-codes": "2.2.0",
|
|
17
|
-
"idb": "7.0
|
|
17
|
+
"idb": "7.1.0",
|
|
18
18
|
"logdown": "3.3.1",
|
|
19
19
|
"long": "4.0.0",
|
|
20
20
|
"uuidjs": "4.2.12"
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"@types/babel__core": "^7",
|
|
29
29
|
"@types/jest": "29.2.0",
|
|
30
30
|
"@types/long": "4.0.1",
|
|
31
|
-
"@types/node": "^
|
|
31
|
+
"@types/node": "^18.11.2",
|
|
32
32
|
"@types/tough-cookie": "4.0.2",
|
|
33
33
|
"@wireapp/commons": "workspace:^",
|
|
34
34
|
"@wireapp/store-engine-dexie": "workspace:^",
|
|
35
|
-
"commander": "
|
|
35
|
+
"commander": "9.4.1",
|
|
36
36
|
"cross-env": "7.0.3",
|
|
37
37
|
"dotenv-defaults": "5.0.2",
|
|
38
38
|
"fake-indexeddb": "4.0.0",
|
|
@@ -73,6 +73,6 @@
|
|
|
73
73
|
"test": "jest",
|
|
74
74
|
"watch": "tsc ---watch"
|
|
75
75
|
},
|
|
76
|
-
"version": "
|
|
77
|
-
"gitHead": "
|
|
76
|
+
"version": "33.0.0",
|
|
77
|
+
"gitHead": "cc1de9547f2528a14d3d23937a154f58476d2faf"
|
|
78
78
|
}
|
package/src/main/Account.js
CHANGED
|
@@ -312,8 +312,8 @@ class Account extends events_1.EventEmitter {
|
|
|
312
312
|
const coreCryptoKeyId = 'corecrypto-key';
|
|
313
313
|
const { CoreCrypto } = await Promise.resolve().then(() => __importStar(require('@wireapp/core-crypto')));
|
|
314
314
|
const dbName = this.generateSecretsDbName(context);
|
|
315
|
-
const secretStore = mlsConfig.
|
|
316
|
-
? await (0, encryptedStore_1.createCustomEncryptedStore)(dbName, mlsConfig.
|
|
315
|
+
const secretStore = mlsConfig.systemCrypto
|
|
316
|
+
? await (0, encryptedStore_1.createCustomEncryptedStore)(dbName, mlsConfig.systemCrypto)
|
|
317
317
|
: await (0, encryptedStore_1.createEncryptedStore)(dbName);
|
|
318
318
|
let key = await secretStore.getsecretValue(coreCryptoKeyId);
|
|
319
319
|
let isNewMLSDevice = false;
|
package/src/main/mls/types.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export interface MLSConfig<T = any> {
|
|
|
18
18
|
* encrypt/decrypt function pair that will be called before storing/fetching secrets in the secrets database.
|
|
19
19
|
* If not provided will use the built in encryption mechanism
|
|
20
20
|
*/
|
|
21
|
-
|
|
21
|
+
systemCrypto?: SecretCrypto<T>;
|
|
22
22
|
/**
|
|
23
23
|
* path on the public server to the core crypto wasm file.
|
|
24
24
|
* This file will be downloaded lazily when corecrypto is needed.
|
|
@@ -71,6 +71,7 @@ const NotificationDatabaseRepository_1 = require("./NotificationDatabaseReposito
|
|
|
71
71
|
const protocol_messaging_1 = require("@wireapp/protocol-messaging");
|
|
72
72
|
const bazinga64_1 = require("bazinga64");
|
|
73
73
|
const TaskScheduler_1 = require("../util/TaskScheduler/TaskScheduler");
|
|
74
|
+
const mls_1 = require("../mls");
|
|
74
75
|
const LowPrecisionTaskScheduler_1 = require("../util/LowPrecisionTaskScheduler/LowPrecisionTaskScheduler");
|
|
75
76
|
const keyPackagesStatusStore_1 = require("../mls/keyPackagesStatusStore/keyPackagesStatusStore");
|
|
76
77
|
const keyMaterialUpdatesStore_1 = require("../mls/keyMaterialUpdatesStore");
|
|
@@ -260,7 +261,12 @@ class NotificationService extends events_1.EventEmitter {
|
|
|
260
261
|
const encryptedData = bazinga64_1.Decoder.fromBase64(event.data).asBytes;
|
|
261
262
|
const groupId = await this.getGroupIdFromConversationId((_a = event.qualified_conversation) !== null && _a !== void 0 ? _a : { id: event.conversation, domain: '' });
|
|
262
263
|
const groupIdBytes = bazinga64_1.Decoder.fromBase64(groupId).asBytes;
|
|
263
|
-
const { proposals, commitDelay, message } = await this.mlsService.decryptMessage(groupIdBytes, encryptedData);
|
|
264
|
+
const { proposals, commitDelay, message, senderClientId: encodedSenderClientId, } = await this.mlsService.decryptMessage(groupIdBytes, encryptedData);
|
|
265
|
+
if (encodedSenderClientId) {
|
|
266
|
+
const decoder = new TextDecoder();
|
|
267
|
+
const senderClientId = decoder.decode((0, mls_1.optionalToUint8Array)(encodedSenderClientId));
|
|
268
|
+
event.senderClientId = senderClientId;
|
|
269
|
+
}
|
|
264
270
|
// Check if the message includes proposals
|
|
265
271
|
if (typeof commitDelay === 'number' || proposals.length > 0) {
|
|
266
272
|
// we are dealing with a proposal, add a task to process this proposal later on
|
|
@@ -283,7 +289,10 @@ class NotificationService extends events_1.EventEmitter {
|
|
|
283
289
|
* @todo Find a proper solution to add mappedEvent to this return
|
|
284
290
|
* otherwise event.data will be base64 raw data of the received event
|
|
285
291
|
*/
|
|
286
|
-
return {
|
|
292
|
+
return {
|
|
293
|
+
event,
|
|
294
|
+
decryptedData,
|
|
295
|
+
};
|
|
287
296
|
// Encrypted Proteus events
|
|
288
297
|
case Events.CONVERSATION_EVENT.OTR_MESSAGE_ADD: {
|
|
289
298
|
if (dryRun) {
|