New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cross-signing #795

Open
wants to merge 6 commits into
base: develop
from

Conversation

Projects
None yet
2 participants
@uhoreg
Member

uhoreg commented Nov 29, 2018

  • check cross-signing data
  • invalidate caches when devices change
  • sign and send attestations

The js-sdk part of vector-im/riot-web#2714

@uhoreg uhoreg changed the title [WIP] cross-signing cross-signing Dec 6, 2018

@uhoreg uhoreg requested a review from dbkr Dec 10, 2018

@dbkr
Member

dbkr left a comment

Whoo! This looks generally awesome other than a few minor js nitpicks.

},
},
},
// not signing key

This comment has been minimized.

@dbkr

dbkr Dec 11, 2018

Member

'no'?

return undefined;
}
state = state || "verified";
// can only make an attestation if the device is verified

This comment has been minimized.

@dbkr

dbkr Dec 11, 2018

Member

This would be a useful thing for the jsdoc

// possibly add an edge to the attestation graph
function addEdge(edges, att, userId, dev) {
if (userId in att.signatures) {
for (const sigId in att.signatures[userId]) { // eslint-disable-line guard-for-in

This comment has been minimized.

@dbkr

dbkr Dec 11, 2018

Member

Eslint was right here :) you want for... of Object.keys(...) probably (well, they'll be essentially the same but it would avoid you having to disable the linter for that line and explain why you don't need the hasOwnProperty check)

if (att.state === "verified") {
verified = true;
} else if (att.state === "revoked") {
// FIXME: need to figure out exactly how revocations work

This comment has been minimized.

@dbkr

dbkr Dec 11, 2018

Member

is this such that this can be merged as-is? seems pretty reasonable I think?

// trusted devices. Will modify the trusted device map by adding the
// devices that can be reached by following the edges.
async function traverseAttestations(edges, trustedDevices, userId, devices, value) {
const stack = [...trustedDevices.keys()];

This comment has been minimized.

@dbkr

dbkr Dec 11, 2018

Member

isn't this just const stack = trustedDevices.keys();?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment