fix small stuffs

This commit is contained in:
Sorunome 2020-05-27 21:40:58 +02:00
parent dda0b17724
commit c779d39818
No known key found for this signature in database
GPG Key ID: B19471D07FC9BE9C
6 changed files with 19 additions and 21 deletions

View File

@ -50,7 +50,7 @@ class CrossSigning {
throw 'Master pubkey key doesn\'t match';
}
// master key is valid, set it to verified
masterKey.setVerified(true, false);
await masterKey.setVerified(true, false);
// and now sign bout our own key and our master key
await sign([
masterKey,

View File

@ -435,7 +435,7 @@ class OpenSSSS {
return await ssss.getStored(type, keyId, privateKey);
}
Future<String> store(String type, String secret) async {
Future<void> store(String type, String secret) async {
await ssss.store(type, secret, keyId, privateKey);
}

View File

@ -261,7 +261,7 @@ abstract class SignedKey {
return false;
}
Future<void> setVerified(bool newVerified, [bool sign = true]) {
void setVerified(bool newVerified, [bool sign = true]) {
_verified = newVerified;
if (sign && client.crossSigning.signable([this])) {
// sign the key!
@ -269,7 +269,7 @@ abstract class SignedKey {
}
}
Future<void> setBlocked(bool newBlocked);
void setBlocked(bool newBlocked);
Map<String, dynamic> toJson() {
final data = Map<String, dynamic>.from(content);
@ -291,16 +291,16 @@ class CrossSigningKey extends SignedKey {
userId != null && publicKey != null && keys != null && ed25519Key != null;
@override
Future<void> setVerified(bool newVerified, [bool sign = true]) {
void setVerified(bool newVerified, [bool sign = true]) {
super.setVerified(newVerified, sign);
return client.database?.setVerifiedUserCrossSigningKey(
client.database?.setVerifiedUserCrossSigningKey(
newVerified, client.id, userId, publicKey);
}
@override
Future<void> setBlocked(bool newBlocked) {
void setBlocked(bool newBlocked) {
blocked = newBlocked;
return client.database?.setBlockedUserCrossSigningKey(
client.database?.setBlockedUserCrossSigningKey(
newBlocked, client.id, userId, publicKey);
}
@ -351,14 +351,14 @@ class DeviceKeys extends SignedKey {
ed25519Key != null;
@override
Future<void> setVerified(bool newVerified, [bool sign = true]) {
void setVerified(bool newVerified, [bool sign = true]) {
super.setVerified(newVerified, sign);
return client.database
client.database
?.setVerifiedUserDeviceKey(newVerified, client.id, userId, deviceId);
}
@override
Future<void> setBlocked(bool newBlocked) {
void setBlocked(bool newBlocked) {
blocked = newBlocked;
for (var room in client.rooms) {
if (!room.encrypted) continue;
@ -366,7 +366,7 @@ class DeviceKeys extends SignedKey {
room.clearOutboundGroupSession();
}
}
return client.database
client.database
?.setBlockedUserDeviceKey(newBlocked, client.id, userId, deviceId);
}

View File

@ -534,7 +534,7 @@ class _KeyVerificationMethodSas extends _KeyVerificationMethod {
: super(request: request);
@override
String _type = 'm.sas.v1';
final _type = 'm.sas.v1';
String keyAgreementProtocol;
String hash;

View File

@ -333,11 +333,9 @@ packages:
matrix_file_e2ee:
dependency: "direct main"
description:
path: "."
ref: "1.x.y"
resolved-ref: "32edeff765369a7a77a0822f4b19302ca24a017b"
url: "https://gitlab.com/famedly/libraries/matrix_file_e2ee.git"
source: git
path: "/home/sorunome/repos/famedly/matrix_file_e2ee"
relative: false
source: path
version: "1.0.3"
meta:
dependency: transitive
@ -413,8 +411,8 @@ packages:
dependency: "direct main"
description:
path: "."
ref: "1.x.y"
resolved-ref: f66975bd1b5cb1865eba5efe6e3a392aa5e396a5
ref: "0c612a525511652a7760126b058de8c924fe8900"
resolved-ref: "0c612a525511652a7760126b058de8c924fe8900"
url: "https://gitlab.com/famedly/libraries/dart-olm.git"
source: git
version: "1.1.1"

View File

@ -24,7 +24,7 @@ dependencies:
olm:
git:
url: https://gitlab.com/famedly/libraries/dart-olm.git
ref: a6cde466e707b54e39df8d035a0a79714621bc0b
ref: 0c612a525511652a7760126b058de8c924fe8900
matrix_file_e2ee:
path: /home/sorunome/repos/famedly/matrix_file_e2ee