Skip to content
Snippets Groups Projects

Resolve "QR Code Data Signing & Verification flow"

Merged Ivan Vasilev requested to merge 9-qr-code-data-signing-verification-flow into master

Closes #9 (closed)

Edited by Ivan Vasilev

Merge request reports

Approval is optional

Merged by Igor MarkinIgor Markin 4 years ago (Dec 3, 2020 3:21pm UTC)

Merge details

  • Changes merged into master with 2ccd4db5.
  • Deleted the source branch.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
125 name: attachment.name,
126 size: attachment.size,
127 };
128 });
129
130 const dataForHashing = {
131 statusId: emailData.statusId,
132 sender: emailData.sender,
133 subject: emailData.subject,
134 date: emailData.date,
135 recipients: emailData.recipients,
136 attachments,
137 };
138
139 const promises = Object.values(dataForHashing).map(async (value) => {
140 const base64 = Buffer.from(JSON.stringify(value)).toString("base64");
  • I have a concern regarding the JSON.stringify of the objects. I am not sure that it will preserve the ordering of the keys. Meaning that in one case you may have "{ name: "...", size: "...", url: "..." } and in another ordering of keys might be different, and hence validation will fail.

    I guess it make sense do some object normalization beforehand. Sort keys alphabetically, for example. Or extract values.

    Edited by Igor Markin
  • changed this line in version 2 of the diff

    By Zdravko Iliev on 2020-11-25T16:06:25 (imported from GitLab project)

  • Please register or sign in to reply
  • 126 size: attachment.size,
    127 };
    128 });
    129
    130 const dataForHashing = {
    131 statusId: emailData.statusId,
    132 sender: emailData.sender,
    133 subject: emailData.subject,
    134 date: emailData.date,
    135 recipients: emailData.recipients,
    136 attachments,
    137 };
    138
    139 const promises = Object.values(dataForHashing).map(async (value) => {
    140 const base64 = Buffer.from(JSON.stringify(value)).toString("base64");
    141 return CryptoService.SHA256(base64);
  • Ivan Vasilev added 1 commit

    added 1 commit

    Compare with previous version

    By Zdravko Iliev on 2020-11-25T16:06:26 (imported from GitLab project)

  • Ivan Vasilev added 1 commit

    added 1 commit

    Compare with previous version

    By Zdravko Iliev on 2020-11-26T07:37:49 (imported from GitLab project)

  • Ivan Vasilev added 1 commit

    added 1 commit

    • 5da6112d - add arraybuffer to base64 before sorting

    Compare with previous version

    By Zdravko Iliev on 2020-11-26T08:49:29 (imported from GitLab project)

  • Ivan Vasilev added 1 commit

    added 1 commit

    Compare with previous version

    By Zdravko Iliev on 2020-11-26T08:50:07 (imported from GitLab project)

  • Ivan Vasilev added 1 commit

    added 1 commit

    Compare with previous version

    By Zdravko Iliev on 2020-11-26T11:49:44 (imported from GitLab project)

  • Ivan Vasilev added 1 commit

    added 1 commit

    • b4d106b7 - update status proto to last version

    Compare with previous version

    By Zdravko Iliev on 2020-11-27T10:54:54 (imported from GitLab project)

  • Ivan Vasilev added 1 commit

    added 1 commit

    Compare with previous version

    By Zdravko Iliev on 2020-11-27T12:02:25 (imported from GitLab project)

  • Ivan Vasilev added 1 commit

    added 1 commit

    • 86575444 - remove date from hashing values

    Compare with previous version

    By Zdravko Iliev on 2020-12-02T08:53:36 (imported from GitLab project)

  • Ivan Vasilev added 1 commit

    added 1 commit

    • 47e3d877 - Add check for email attachments

    Compare with previous version

    By Sasha Ilieva on 2020-12-02T14:19:22 (imported from GitLab project)

  • Ivan Vasilev added 1 commit

    added 1 commit

    • d640f44c - Define attachments as empty array

    Compare with previous version

    By Sasha Ilieva on 2020-12-02T14:44:10 (imported from GitLab project)

  • Ivan Vasilev unmarked as a Work In Progress

    unmarked as a Work In Progress

    By Zdravko Iliev on 2020-12-03T14:34:58 (imported from GitLab project)

  • Ivan Vasilev added ReadyForQA label and removed DevInProgress label

    added ReadyForQA label and removed DevInProgress label

  • added ReadyForMergeInMaster label and removed ReadyForQA label

  • Ivan Vasilev added 20 commits

    added 20 commits

    Compare with previous version

    By Zdravko Iliev on 2020-12-03T14:37:22 (imported from GitLab project)

  • Ivan Vasilev added 1 commit

    added 1 commit

    Compare with previous version

    By Zdravko Iliev on 2020-12-03T14:40:07 (imported from GitLab project)

  • Ivan Vasilev added 1 commit

    added 1 commit

    Compare with previous version

    By Zdravko Iliev on 2020-12-03T14:42:39 (imported from GitLab project)

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading