Skip to content

Commit

Permalink
Use correct digest character lengths. Fixes usnistgov#2053
Browse files Browse the repository at this point in the history
  • Loading branch information
david-waltermire committed Nov 14, 2024
1 parent db9dfc4 commit 728af69
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/metaschema/oscal_metadata_metaschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -940,10 +940,10 @@
</remarks>
</define-flag>
<constraint>
<matches target=".[@algorithm=('SHA-224','SHA3-224')]" regex="^[0-9a-fA-F]{28}$"/>
<matches target=".[@algorithm=('SHA-256','SHA3-256')]" regex="^[0-9a-fA-F]{32}$"/>
<matches target=".[@algorithm=('SHA-384','SHA3-384')]" regex="^[0-9a-fA-F]{48}$"/>
<matches target=".[@algorithm=('SHA-512','SHA3-512')]" regex="^[0-9a-fA-F]{64}$"/>
<matches id="oscal-check-hash-length-SHA2-3-224" target=".[@algorithm=('SHA-224','SHA3-224')]" regex="^[0-9a-fA-F]{56}$"/>
<matches id="oscal-check-hash-length-SHA2-3-256" target=".[@algorithm=('SHA-256','SHA3-256')]" regex="^[0-9a-fA-F]{64}$"/>
<matches id="oscal-check-hash-length-SHA2-3-384" target=".[@algorithm=('SHA-384','SHA3-384')]" regex="^[0-9a-fA-F]{96}$"/>
<matches id="oscal-check-hash-length-SHA2-3-512" target=".[@algorithm=('SHA-512','SHA3-512')]" regex="^[0-9a-fA-F]{128}$"/>
</constraint>
</define-field>

Expand Down

0 comments on commit 728af69

Please sign in to comment.