@wireapp/core 43.7.0 → 43.7.2
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/lib/Account.d.ts +12 -3
- package/lib/Account.d.ts.map +1 -1
- package/lib/Account.js +3 -3
- package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/AcmeService.d.ts +72 -104
- package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/AcmeService.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/AcmeService.js +14 -33
- package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/AcmeService.types.d.ts +2 -3
- package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/AcmeService.types.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIService.types.d.ts +2 -5
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIService.types.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIServiceInternal.d.ts +8 -7
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIServiceInternal.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIServiceInternal.js +57 -119
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/Authorization.d.ts +2 -2
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/Authorization.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/Authorization.js +3 -3
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/DpopChallenge/DpopChallenge.d.ts +6 -10
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/DpopChallenge/DpopChallenge.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/DpopChallenge/DpopChallenge.types.d.ts +2 -2
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/DpopChallenge/DpopChallenge.types.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/OidcChallenge.d.ts +13 -17
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/OidcChallenge.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/Order.d.ts +4 -4
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/Order.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/Order.js +9 -10
- package/lib/messagingProtocols/mls/E2EIdentityService/Storage/E2EIStorage.js +2 -2
- package/lib/messagingProtocols/mls/E2EIdentityService/Storage/E2EIStorage.schema.d.ts +5 -0
- package/lib/messagingProtocols/mls/E2EIdentityService/Storage/E2EIStorage.schema.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/Storage/E2EIStorage.schema.js +1 -0
- package/lib/messagingProtocols/mls/MLSService/MLSService.d.ts +11 -2
- package/lib/messagingProtocols/mls/MLSService/MLSService.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/MLSService/MLSService.js +36 -40
- package/package.json +4 -4
|
@@ -635,49 +635,45 @@ class MLSService extends commons_1.TypedEventEmitter {
|
|
|
635
635
|
// If we don't have an OAuth id token, we need to start the certificate process with Oauth
|
|
636
636
|
if (!oAuthIdToken) {
|
|
637
637
|
const data = await instance.startCertificateProcess(hasActiveCertificate);
|
|
638
|
-
|
|
639
|
-
|
|
638
|
+
const oidcChallenge = data.challenge;
|
|
639
|
+
if (!oidcChallenge) {
|
|
640
|
+
throw new Error('Not oidc challenge found');
|
|
640
641
|
}
|
|
641
|
-
|
|
642
|
+
return { status: 'authentication', authenticationChallenge: data };
|
|
642
643
|
}
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
// If we are not refreshing the active certificate, we need to continue the certificate process with Oauth
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
};
|
|
675
|
-
await this.uploadCommitBundle(groupIdAsBytes, newCommitBundle);
|
|
676
|
-
}
|
|
677
|
-
return true;
|
|
678
|
-
}
|
|
644
|
+
// If we have an OAuth id token, we can continue the certificate process / start a refresh
|
|
645
|
+
const rotateBundle = !hasActiveCertificate
|
|
646
|
+
? // If we are not refreshing the active certificate, we need to continue the certificate process with Oauth
|
|
647
|
+
await instance.continueCertificateProcess(oAuthIdToken)
|
|
648
|
+
: // If we are refreshing the active certificate, can start the refresh process
|
|
649
|
+
await instance.startRefreshCertficateFlow(oAuthIdToken, hasActiveCertificate);
|
|
650
|
+
if (rotateBundle === undefined) {
|
|
651
|
+
throw new Error('Could not get the rotate bundle');
|
|
652
|
+
}
|
|
653
|
+
// upload the clients public keys
|
|
654
|
+
if (!hasActiveCertificate) {
|
|
655
|
+
// we only upload public keys for the initial certification process. Renewals do not need to upload new public keys
|
|
656
|
+
await this.uploadMLSPublicKeys(client);
|
|
657
|
+
}
|
|
658
|
+
// Remove old key packages
|
|
659
|
+
await this.deleteMLSKeyPackages(client.id, rotateBundle.keyPackageRefsToRemove);
|
|
660
|
+
// Upload new key packages with x509 certificate
|
|
661
|
+
await this.uploadMLSKeyPackages(client.id, rotateBundle.newKeyPackages);
|
|
662
|
+
// Verify that we have enough key packages
|
|
663
|
+
await this.verifyRemoteMLSKeyPackagesAmount(client.id);
|
|
664
|
+
// Update keying material
|
|
665
|
+
for (const [groupId, commitBundle] of rotateBundle.commits) {
|
|
666
|
+
const groupIdAsBytes = bazinga64_1.Converter.hexStringToArrayBufferView(groupId);
|
|
667
|
+
// manual copy of the commit bundle data because of a problem while cloning it
|
|
668
|
+
const newCommitBundle = {
|
|
669
|
+
commit: commitBundle.commit,
|
|
670
|
+
// @ts-ignore
|
|
671
|
+
groupInfo: (commitBundle === null || commitBundle === void 0 ? void 0 : commitBundle.group_info) || commitBundle.groupInfo,
|
|
672
|
+
welcome: commitBundle === null || commitBundle === void 0 ? void 0 : commitBundle.welcome,
|
|
673
|
+
};
|
|
674
|
+
await this.uploadCommitBundle(groupIdAsBytes, newCommitBundle);
|
|
679
675
|
}
|
|
680
|
-
return
|
|
676
|
+
return { status: 'successful' };
|
|
681
677
|
}
|
|
682
678
|
catch (error) {
|
|
683
679
|
this.logger.error('E2EI - Failed to enroll', error);
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"./lib/cryptography/AssetCryptography/crypto.node": "./lib/cryptography/AssetCryptography/crypto.browser.js"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@wireapp/api-client": "^26.10.
|
|
14
|
+
"@wireapp/api-client": "^26.10.1",
|
|
15
15
|
"@wireapp/commons": "^5.2.4",
|
|
16
16
|
"@wireapp/core-crypto": "1.0.0-rc.30",
|
|
17
17
|
"@wireapp/cryptobox": "12.8.0",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"fake-indexeddb": "^4.0.0",
|
|
45
45
|
"jest": "^29.2.1",
|
|
46
46
|
"jest-websocket-mock": "2.5.0",
|
|
47
|
-
"nock": "13.
|
|
47
|
+
"nock": "13.5.0",
|
|
48
48
|
"rimraf": "^3.0.2",
|
|
49
49
|
"typescript": "^5.0.4"
|
|
50
50
|
},
|
|
@@ -61,6 +61,6 @@
|
|
|
61
61
|
"test:coverage": "jest --coverage",
|
|
62
62
|
"watch": "tsc --watch"
|
|
63
63
|
},
|
|
64
|
-
"version": "43.7.
|
|
65
|
-
"gitHead": "
|
|
64
|
+
"version": "43.7.2",
|
|
65
|
+
"gitHead": "368d0946bb85bb8eff2c71d91b8c4b46c14aeb1d"
|
|
66
66
|
}
|