fix: A few ssss fixes

This commit is contained in:
Sorunome 2021-03-09 16:33:02 +01:00
parent 3f2ced692f
commit 7ef288ec91
No known key found for this signature in database
GPG Key ID: B19471D07FC9BE9C
1 changed files with 7 additions and 0 deletions

View File

@ -275,6 +275,9 @@ class SSSS {
}
// check if it is still valid
final keys = keyIdsFromType(type);
if (keys == null) {
return null;
}
final isValid = (dbEntry) =>
keys.contains(dbEntry.keyId) &&
client.accountData[type].content['encrypted'][dbEntry.keyId]
@ -694,6 +697,10 @@ class OpenSSSS {
// now try to self-sign
if (ssss.encryption.crossSigning.enabled &&
ssss.client.userDeviceKeys[ssss.client.userID]?.masterKey != null &&
(ssss
.keyIdsFromType(EventTypes.CrossSigningMasterKey)
?.contains(keyId) ??
false) &&
(ssss.client.isUnknownSession ||
!ssss.client.userDeviceKeys[ssss.client.userID].masterKey
.directVerified)) {