Skip to content

Commit

Permalink
test_s_generate_parameters: Consider a DSA error in FIPS.
Browse files Browse the repository at this point in the history
DSA kengen is not FIPS-approved. The `EVP_PKEY_paramgen` in the
`OpenSSL::PKey.generate_parameters("DSA")` raises a DSA error in FIPS by the
following commit. Split the test for DSA.

openssl/openssl@49a35f0#diff-605396c063194975af8ce31399d42690ab18186b422fb5012101cc9132660fe1R611-R614
  • Loading branch information
junaruga committed Aug 15, 2024
1 parent a664af8 commit 5ca6eb4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/openssl/test_pkey.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ def test_s_generate_parameters
assert_raise(OpenSSL::PKey::PKeyError) {
OpenSSL::PKey.generate_parameters("EC", "invalid" => "option")
}
end

def test_s_generate_parameters_with_block
# DSA kengen is not FIPS-approved.
# https://github.com/openssl/openssl/commit/49a35f0#diff-605396c063194975af8ce31399d42690ab18186b422fb5012101cc9132660fe1R611-R614
omit_on_fips

# Parameter generation callback is called
if openssl?(3, 0, 0, 0) && !openssl?(3, 0, 0, 6)
Expand Down

0 comments on commit 5ca6eb4

Please sign in to comment.