summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJun Aruga <[email protected]>2024-08-15 16:20:13 +0200
committergit <[email protected]>2024-08-16 06:09:15 +0000
commit08db4bc672eea0426c786ceece3545ac44eccad6 (patch)
treed8242e9038cd4a612b9567eada7fa707e5b68efa /test
parent018bd07f07e43a5be8ed94cfbcaac3c742b30b0a (diff)
[ruby/openssl] test_s_generate_parameters: Consider a DSA error in FIPS.
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. https://github.com/openssl/openssl/commit/49a35f0#diff-605396c063194975af8ce31399d42690ab18186b422fb5012101cc9132660fe1R611-R614 https://github.com/ruby/openssl/commit/5ca6eb4eca
Diffstat (limited to 'test')
-rw-r--r--test/openssl/test_pkey.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/openssl/test_pkey.rb b/test/openssl/test_pkey.rb
index aee0546f63..f1c5f6f5f7 100644
--- a/test/openssl/test_pkey.rb
+++ b/test/openssl/test_pkey.rb
@@ -38,6 +38,12 @@ class OpenSSL::TestPKey < OpenSSL::PKeyTestCase
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)