Don't use private keys for QR code

This commit is contained in:
Travis Ralston 2020-01-20 23:10:35 -07:00
parent 1ec746c014
commit 586a240e41

View file

@ -45,17 +45,15 @@ export default class VerificationPanel extends React.PureComponent {
if (request.requested) { if (request.requested) {
return (<p>Waiting for {request.otherUserId} to accept ... <Spinner /></p>); return (<p>Waiting for {request.otherUserId} to accept ... <Spinner /></p>);
} else if (request.ready) { } else if (request.ready) {
const keyId = `ed25519:${MatrixClientPeg.get().getCrossSigningId()}`;
const qrCodeKeys = [ const qrCodeKeys = [
[MatrixClientPeg.get().getDeviceId(), MatrixClientPeg.get().getDeviceEd25519Key()], [MatrixClientPeg.get().getDeviceId(), MatrixClientPeg.get().getDeviceEd25519Key()],
[MatrixClientPeg.get().getCrossSigningId(), MatrixClientPeg.get().getCrossSigningKey("master")], [keyId, MatrixClientPeg.get().getCrossSigningId()],
]; ];
// TODO: Await a bunch of this
const otherCrossSigning = MatrixClientPeg.get().getStoredCrossSigningForUser(request.otherUserId);
const otherUserKey = otherCrossSigning ? otherCrossSigning.getCrossSigningKey("master") : null;
const qrCode = <VerificationQRCode const qrCode = <VerificationQRCode
keyholderUserId={MatrixClientPeg.get().getUserId()} keyholderUserId={MatrixClientPeg.get().getUserId()}
requestEventId={request.event.eventId} requestEventId={request.event.eventId}
otherUserKey={otherUserKey} otherUserKey={"todo"}
secret={request.encodedSharedSecret} secret={request.encodedSharedSecret}
keys={qrCodeKeys} keys={qrCodeKeys}
/>; />;