Skip to content

Commit

Permalink
Formatting: Linked all error codes used back to DI spec with "data-ci…
Browse files Browse the repository at this point in the history
…te" attribute.
  • Loading branch information
Wind4Greg authored and msporny committed Jun 30, 2024
1 parent 66bf23f commit 5daa501
Showing 1 changed file with 25 additions and 15 deletions.
40 changes: 25 additions & 15 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ <h4>Transformation (ecdsa-rdfc-2019)</h4>
`DataIntegrityProof` and |options|.|cryptosuite| is not
set to the string `ecdsa-rdfc-2019`,
an error MUST be raised and SHOULD convey an error type of
`PROOF_TRANSFORMATION_ERROR`.
<a data-cite="VC-DATA-INTEGRITY#PROOF_TRANSFORMATION_ERROR">PROOF_TRANSFORMATION_ERROR</a>.
</li>
<li>
Let |canonicalDocument| be the result of converting |unsecuredDocument|
Expand Down Expand Up @@ -823,12 +823,13 @@ <h4>Proof Configuration (ecdsa-rdfc-2019)</h4>
If |proofConfig|.|type| is not set to `DataIntegrityProof` and/or
|proofConfig|.|cryptosuite| is not set to `ecdsa-rdfc-2019`, an
error MUST be raised and SHOULD convey an error type of
`PROOF_GENERATION_ERROR`.
<a data-cite="VC-DATA-INTEGRITY#PROOF_GENERATION_ERROR">PROOF_GENERATION_ERROR</a>.
</li>
<li>
If |proofConfig|.|created| is set and if the value is not a
valid [[XMLSCHEMA11-2]] datetime, an error MUST be
raised and SHOULD convey an error type of `PROOF_GENERATION_ERROR`.
raised and SHOULD convey an error type of
<a data-cite="VC-DATA-INTEGRITY#PROOF_GENERATION_ERROR">PROOF_GENERATION_ERROR</a>.
</li>
<li>
Set |proofConfig|.|@context| to
Expand Down Expand Up @@ -1092,7 +1093,8 @@ <h4>Transformation (ecdsa-jcs-2019)</h4>
If |options|.|type| is not set to the string
`DataIntegrityProof` and |options|.|cryptosuite| is not
set to the string `ecdsa-jcs-2019`, an error MUST be raised and SHOULD
convey an error type of `PROOF_TRANSFORMATION_ERROR`.
convey an error type of
<a data-cite="VC-DATA-INTEGRITY#PROOF_TRANSFORMATION_ERROR">PROOF_TRANSFORMATION_ERROR</a>.
</li>
<li>
Let |canonicalDocument| be the result of applying the
Expand Down Expand Up @@ -1179,12 +1181,13 @@ <h4>Proof Configuration (ecdsa-jcs-2019)</h4>
If |proofConfig|.|type| is not set to `DataIntegrityProof` and/or
|proofConfig|.|cryptosuite| is not set to `ecdsa-jcs-2019`,
an error MUST be raised and SHOULD convey an error type of
`PROOF_GENERATION_ERROR`.
<a data-cite="VC-DATA-INTEGRITY#PROOF_GENERATION_ERROR">PROOF_GENERATION_ERROR</a>.
</li>
<li>
If |proofConfig|.|created| is set and if the value is not a
valid [[XMLSCHEMA11-2]] datetime, an error MUST be raised and SHOULD convey
an error type of `PROOF_GENERATION_ERROR`.
an error type of
<a data-cite="VC-DATA-INTEGRITY#PROOF_GENERATION_ERROR">PROOF_GENERATION_ERROR</a>.
</li>
<li>
Let |canonicalProofConfig| be the result of applying the
Expand Down Expand Up @@ -1810,7 +1813,7 @@ <h4>selectPaths</h4>
<li>
Set |value| to |parentValue.|path|. If |value| is now undefined,
an error MUST be raised and SHOULD convey an error type of
`PROOF_GENERATION_ERROR`,
<a data-cite="VC-DATA-INTEGRITY#PROOF_GENERATION_ERROR">PROOF_GENERATION_ERROR</a>,
indicating that the JSON pointer does not match the given |document|.
</li>
<li>
Expand Down Expand Up @@ -2231,7 +2234,8 @@ <h4>parseBaseProofValue</h4>
<li>
If the |proofValue| string does not start with `u`, indicating that it is
a multibase-base64url-no-pad-encoded value, an error MUST be raised
and SHOULD convey an error type of `PROOF_VERIFICATION_ERROR`.
and SHOULD convey an error type of
<a data-cite="VC-DATA-INTEGRITY#PROOF_VERIFICATION_ERROR">PROOF_VERIFICATION_ERROR</a>.
</li>
<li>
Initialize |decodedProofValue| to the result of base64url-no-pad-decoding the
Expand All @@ -2240,7 +2244,8 @@ <h4>parseBaseProofValue</h4>
<li>
If the |decodedProofValue| does not start with the ECDSA-SD base proof
header bytes `0xd9`, `0x5d`, and `0x00`, an error MUST be raised and SHOULD
convey an error type of `PROOF_VERIFICATION_ERROR`.
convey an error type of
<a data-cite="VC-DATA-INTEGRITY#PROOF_VERIFICATION_ERROR">PROOF_VERIFICATION_ERROR</a>.
</li>
<li>
Initialize |components| to an array that is the result of CBOR-decoding the
Expand Down Expand Up @@ -2505,7 +2510,8 @@ <h4>parseDerivedProofValue</h4>
Ensure the |proofValue| string starts with `u`, indicating that it is a
If the |proofValue| string does not start with `u`, indicating that it is a
multibase-base64url-no-pad-encoded value, an error MUST be raised
and SHOULD convey an error type of `PROOF_VERIFICATION_ERROR`.
and SHOULD convey an error type of
<a data-cite="VC-DATA-INTEGRITY#PROOF_VERIFICATION_ERROR">PROOF_VERIFICATION_ERROR</a>.
</li>
<li>
Initialize |decodedProofValue| to the result of base64url-no-pad-decoding the
Expand All @@ -2514,15 +2520,17 @@ <h4>parseDerivedProofValue</h4>
<li>
If the |decodedProofValue| does not start with the ECDSA-SD disclosure proof
header bytes `0xd9`, `0x5d`, and `0x01`, an error MUST be raised
and SHOULD convey an error type of `PROOF_VERIFICATION_ERROR`.
and SHOULD convey an error type of
<a data-cite="VC-DATA-INTEGRITY#PROOF_VERIFICATION_ERROR">PROOF_VERIFICATION_ERROR</a>.
</li>
<li>
Initialize |components| to an array that is the result of CBOR-decoding the bytes
that follow the three-byte ECDSA-SD disclosure proof header. If the result is not
an array of the following five elements — a byte array of length 64; a byte array
of length 36; an array of byte arrays, each of length 64; a map of integers to
byte arrays, each of length 32; and an array of integers — an error MUST be raised
and SHOULD convey an error type of `PROOF_VERIFICATION_ERROR`.
and SHOULD convey an error type of
<a data-cite="VC-DATA-INTEGRITY#PROOF_VERIFICATION_ERROR">PROOF_VERIFICATION_ERROR</a>.
</li>
<li>
Replace the fourth element in |components| using the result of calling the
Expand Down Expand Up @@ -2811,12 +2819,13 @@ <h4>Base Proof Configuration (ecdsa-sd-2023)</h4>
If |proofConfig|.|type| is not set to `DataIntegrityProof` and/or
|proofConfig|.|cryptosuite| is not set to `ecdsa-sd-2023`,
an error MUST be raised and SHOULD convey an error type of
`PROOF_GENERATION_ERROR`.
<a data-cite="VC-DATA-INTEGRITY#PROOF_GENERATION_ERROR">PROOF_GENERATION_ERROR</a>.
</li>
<li>
If |proofConfig|.|created| is set and if the value is not a
valid [[XMLSCHEMA11-2]] datetime, an error MUST be raised and SHOULD convey an
error type of `PROOF_GENERATION_ERROR`.
error type of
<a data-cite="VC-DATA-INTEGRITY#PROOF_GENERATION_ERROR">PROOF_GENERATION_ERROR</a>.
</li>
<li>
Set |proofConfig|.|@context| to
Expand Down Expand Up @@ -2974,7 +2983,8 @@ <h4>Verify Derived Proof (ecdsa-sd-2023)</h4>
<li>
If the length of |signatures| does not match the length of |nonMandatory|,
an error MUST be raised and SHOULD convey an error type of
`PROOF_VERIFICATION_ERROR`, indicating that the signature count does not match
<a data-cite="VC-DATA-INTEGRITY#PROOF_VERIFICATION_ERROR">PROOF_VERIFICATION_ERROR</a>,
indicating that the signature count does not match
the non-mandatory message count.
</li>
<li>
Expand Down

0 comments on commit 5daa501

Please sign in to comment.