Skip to content

Commit

Permalink
Update matchProof().
Browse files Browse the repository at this point in the history
  • Loading branch information
JSAssassin committed Apr 14, 2023
1 parent f206a53 commit 2ea9522
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# jsonld-signatures ChangeLog

## 11.1.0 - 2023-TBD

### Changed
- Update `matchProof()` to check if the proof cryptosuite matches along with
proof type for `DataIntegrityProof`.

## 11.1.0 - 2023-02-07

### Added
Expand Down
4 changes: 4 additions & 0 deletions lib/suites/LinkedDataProof.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ module.exports = class LinkedDataProof {
async matchProof({
proof /*, document, purpose, documentLoader, expansionMap */
}) {
if(proof.type === 'DataIntegrityProof') {
const {type, cryptosuite} = proof;
return type === this.type && cryptosuite === this.cryptosuite;
}
return proof.type === this.type;
}
};

0 comments on commit 2ea9522

Please sign in to comment.