Skip to content

Commit

Permalink
HMAC: Note the MAC output length is checked inside of OpenSSL
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Jelen <[email protected]>
  • Loading branch information
Jakuje committed Jan 3, 2025
1 parent e2bb804 commit 8400afc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ossl/hmac.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ impl HMACOperation {
output.copy_from_slice(&buf[..output.len()]);
buf.zeroize();

/* The OpenSSL implementation verifies the truncation is > 112b according to the
* FIPS 140-3 IG, C.D Use of a Truncated HMAC
*/
self.fips_approved = check_mac_fips_indicators(&mut self.ctx)?;
Ok(())
}
Expand Down

0 comments on commit 8400afc

Please sign in to comment.