Skip to content

Commit

Permalink
test: Improve coverage for the PBKDF2 unit tests
Browse files Browse the repository at this point in the history
Fixes openssl#25136

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Dmitry Belyavskiy <[email protected]>
(Merged from openssl#25160)
  • Loading branch information
paulidale committed Aug 13, 2024
1 parent bd3b24c commit 21bcae6
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions test/recipes/30-test_evp_data/evpkdf_pbkdf2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ Reason = xof digests not allowed

Title = FIPS indicator tests

# Test that the operation with unapproved parameters is rejected
# Test that operations with unapproved parameters are rejected
FIPSversion = >=3.4.0
KDF = PBKDF2
Ctrl.pass = pass:password
Expand All @@ -238,7 +238,7 @@ Ctrl.digest = digest:sha1
Result = KDF_CTRL_ERROR
Reason = invalid salt length

# Test that the operation with unapproved parameters is reported as unapproved
# Test that operations with unapproved parameters are reported as unapproved
FIPSversion = >=3.4.0
KDF = PBKDF2
Unapproved = 1
Expand All @@ -259,3 +259,14 @@ Ctrl.salt = salt:saltSALTsaltSALTsaltSALTsaltSALTsalt
Ctrl.iter = iter:4096
Ctrl.digest = digest:sha1
Output = 043c508e57c6427036fd2c6cd2a02ec7530a412c

Title = Test that a too low iteration count raises an error

Availablein = fips
KDF = PBKDF2
Ctrl.pass = pass:password
Ctrl.salt = salt:saltydaysarethebest
Ctrl.iter = iter:10
Ctrl.digest = digest:sha1
Result = KDF_CTRL_ERROR
Reason = invalid iteration count

0 comments on commit 21bcae6

Please sign in to comment.