Skip to content

Commit

Permalink
Check expectedProofPurpose before checking signature.
Browse files Browse the repository at this point in the history
  • Loading branch information
msporny committed Oct 23, 2022
1 parent f0732e5 commit f3a3d2c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions index.html
Expand Up @@ -1735,6 +1735,11 @@ <h3>Verify Proof</h3>
MUST be raised.
</li>
<li>
If the <var>proof</var>.<var>proofPurpose</var> value does not match
<var>options</var>.<var>expectedProofPurpose</var>, a
`MISMATCHED_PROOF_PURPOSE_ERROR` MUST be raised.
</li>
<li>
Let <var>unsecuredDocument</var> be a copy of <var>securedDocument</var> with
the `proof` value removed.
</li>
Expand Down Expand Up @@ -1762,11 +1767,6 @@ <h3>Verify Proof</h3>
parameters provided as inputs to the algorithm.
</li>
<li>
If the <var>proof</var>.<var>proofPurpose</var> value does not match
<var>options</var>.<var>proofPurpose</var>, a `MISMATCHED_PROOF_PURPOSE_ERROR`
MUST be raised.
</li>
<li>
If the <var>proof</var>.<var>created</var> is set and it deviates more than
<var>options</var>.<var>acceptableCreatedTimeDeviationInSeconds</var> seconds, a
`CREATED_TIME_DEVIATION_ERROR` MUST be raised.
Expand Down

0 comments on commit f3a3d2c

Please sign in to comment.