mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 05:55:00 +08:00
access cross-signing callbacks via method
This commit is contained in:
parent
4396d85d1f
commit
26177a19d5
@ -142,13 +142,13 @@ const onSecretRequested = async function({
|
||||
console.log(`CrossSigningManager: Ignoring request from untrusted device ${deviceId}`);
|
||||
return;
|
||||
}
|
||||
const crossSigning = client._crypto._crossSigningInfo;
|
||||
if (!crossSigning._cacheCallbacks.getCrossSigningKeyCache) return;
|
||||
const callbacks = client.getCrossSigningCacheCallbacks();
|
||||
if (!callbacks.getCrossSigningKeyCache) return;
|
||||
if (name === "m.key.self_signing") {
|
||||
const key = await crossSigning._cacheCallbacks.getCrossSigningKeyCache("self_signing");
|
||||
const key = await callbacks.getCrossSigningKeyCache("self_signing");
|
||||
return key && encodeBase64(key);
|
||||
} else if (name === "m.key.user_signing") {
|
||||
const key = await crossSigning._cacheCallbacks.getCrossSigningKeyCache("user_signing");
|
||||
const key = await callbacks.getCrossSigningKeyCache("user_signing");
|
||||
return key && encodeBase64(key);
|
||||
}
|
||||
console.warn("onSecretRequested didn't recognise the secret named ", name);
|
||||
|
Loading…
Reference in New Issue
Block a user