Merge pull request #4570 from matrix-org/t3chguy/rageshake_xsign_debug

Send cross-signing debug booleans over rageshake
pull/21833/head
Michael Telatynski 2020-05-12 10:22:12 +01:00 committed by GitHub
commit 422a22ab90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 25 additions and 0 deletions

View File

@ -109,6 +109,31 @@ export default async function sendBugReport(bugReportEndpoint: string, opts: IOp
}
body.append('device_keys', keys.join(', '));
body.append('cross_signing_key', client.getCrossSigningId());
body.append('device_keys', keys.join(', '));
// add cross-signing status information
const crossSigning = client._crypto._crossSigningInfo;
const secretStorage = client._crypto._secretStorage;
body.append("cross_signing_key", crossSigning.getId());
body.append("cross_signing_pk_in_ssss",
String(!!(await crossSigning.isStoredInSecretStorage(secretStorage))));
body.append("ssss_key_in_account", String(!!(await secretStorage.hasKey())));
const pkCache = client.getCrossSigningCacheCallbacks();
body.append("self_signing_pk_cached",
String(!!(pkCache && await pkCache.getCrossSigningKeyCache("self_signing"))));
body.append("user_signing_pk_cached",
String(!!(pkCache && await pkCache.getCrossSigningKeyCache("user_signing"))));
const sessionBackupKeyFromCache = await client._crypto.getSessionBackupPrivateKey();
body.append("session_backup_key_cached", String(!!sessionBackupKeyFromCache));
body.append("session_backup_key_well_formed", String(sessionBackupKeyFromCache instanceof Uint8Array));
body.append("cross_signing_supported_by_hs",
String(await client.doesServerSupportUnstableFeature("org.matrix.e2e_cross_signing")));
body.append("cross_signing_ready", String(await client.isCrossSigningReady()));
body.append("ssss_key_needs_upgrade", String(await client.secretStorageKeyNeedsUpgrade()));
}
}