Merge branch 'soru/better-self-verification' into 'main'

chore: add keyOrPassphrase to cross-signing selfVerify

See merge request famedly/famedlysdk!635
This commit is contained in:
Krille Fear 2021-02-03 12:07:29 +00:00
commit bb9f0dd98a
1 changed files with 6 additions and 2 deletions

View File

@ -70,9 +70,13 @@ class CrossSigning {
null; null;
} }
Future<void> selfSign({String passphrase, String recoveryKey}) async { Future<void> selfSign(
{String passphrase, String recoveryKey, String keyOrPassphrase}) async {
final handle = encryption.ssss.open(EventTypes.CrossSigningMasterKey); final handle = encryption.ssss.open(EventTypes.CrossSigningMasterKey);
await handle.unlock(passphrase: passphrase, recoveryKey: recoveryKey); await handle.unlock(
passphrase: passphrase,
recoveryKey: recoveryKey,
keyOrPassphrase: keyOrPassphrase);
await handle.maybeCacheAll(); await handle.maybeCacheAll();
final masterPrivateKey = final masterPrivateKey =
base64.decode(await handle.getStored(EventTypes.CrossSigningMasterKey)); base64.decode(await handle.getStored(EventTypes.CrossSigningMasterKey));