Skip to content

Commit

Permalink
Update to check if proof.cryptosuite exists.
Browse files Browse the repository at this point in the history
  • Loading branch information
JSAssassin committed Apr 14, 2023
1 parent 2ea9522 commit 412bc73
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
## 11.1.0 - 2023-TBD

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

## 11.1.0 - 2023-02-07

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

0 comments on commit 412bc73

Please sign in to comment.