ruby/test/openssl
KJ Tsanaktsidis 63e9eaa5be [ruby/openssl] Fix test_create_with_mac_iter accidently setting keytype not maciter
This test was accidentally passing the value 2048 into the keytype
parameter of PKCS12_create, not the mac_iter parameter (because it had
one too many `nil`s in the call). This value is invalid, and will make
OpenSSL perform an out-of-bounds read which is caught when compiling
with ASAN.

This commit fixes the tests, and also adds some validation to
PKCS12.create to make sure any keytype passed is actually valid. Since
there only two valid keytype constants, and the whole feature is an
export-grade crypto era thing only ever supported by old MSIE, it seems
far more likely that code in the whild is using keytype similarly by
mistake rather than as intended. So this validation might catch that.

47028686d2
2024-06-05 00:45:53 +00:00
..
fixtures/pkey [ruby/openssl] Fix test_pkey_dsa.rb in FIPS. 2024-03-27 12:16:11 +09:00
test_asn1.rb [ruby/openssl] test_asn1.rb: Remove the assertions of the time string format without second. 2024-03-13 15:19:40 +00:00
test_bn.rb
test_buffering.rb
test_cipher.rb [ruby/openssl] cipher: fix buffer overflow in Cipher#update 2024-05-02 16:26:11 +09:00
test_config.rb
test_digest.rb [ruby/openssl] Add OpenSSL::Digest.digests to get a list of available digests 2024-04-30 15:05:50 +00:00
test_engine.rb
test_fips.rb [ruby/openssl] test_fips.rb: Fix the OpenSSL.fips_mode affecting other tests. 2023-09-21 18:04:55 +00:00
test_hmac.rb
test_kdf.rb
test_ns_spki.rb [ruby/openssl] Prefer String#unpack1 2023-09-06 19:24:53 +09:00
test_ocsp.rb [ruby/openssl] test/openssl/test_ocsp.rb: fix flaky test 2024-01-17 17:13:16 +00:00
test_ossl.rb [ruby/openssl] test/openssl/test_ossl.rb: relax assertion for error messages 2023-09-06 19:30:55 +09:00
test_pair.rb [ruby/openssl] read: don't clear buffer when nothing can be read 2024-05-05 08:00:00 +00:00
test_pkcs7.rb [ruby/openssl] Add to_text for PKCS7 and Timestamp::Response 2024-05-08 09:39:13 +00:00
test_pkcs12.rb [ruby/openssl] Fix test_create_with_mac_iter accidently setting keytype not maciter 2024-06-05 00:45:53 +00:00
test_pkey.rb [ruby/openssl] test_pkey.rb: Refactor the test_ed25519 on FIPS. 2023-09-21 18:04:55 +00:00
test_pkey_dh.rb Fix test_pkey_dh.rb in FIPS. 2023-11-25 10:12:28 +00:00
test_pkey_dsa.rb [ruby/openssl] Fix test_pkey_dsa.rb in FIPS. 2024-03-27 12:16:11 +09:00
test_pkey_ec.rb [ruby/openssl] Fix test_pkey_ec.rb on FIPS. 2023-09-21 18:04:56 +00:00
test_pkey_rsa.rb [ruby/openssl] Prefer String#unpack1 2023-09-06 19:24:53 +09:00
test_provider.rb [ruby/openssl] test_provider.rb: Make a legacy provider test optional. 2024-03-13 15:47:27 +00:00
test_random.rb
test_ssl.rb [ruby/openssl] Remove trailing space in test_ssl.rb 2024-04-30 15:23:15 +00:00
test_ssl_session.rb [ruby/openssl] Prefer String#unpack1 2023-09-06 19:24:53 +09:00
test_ts.rb [ruby/openssl] Add to_text for PKCS7 and Timestamp::Response 2024-05-08 09:39:13 +00:00
test_x509attr.rb
test_x509cert.rb
test_x509crl.rb
test_x509ext.rb [ruby/openssl] Exact checks with assert_include 2023-10-06 09:45:20 +00:00
test_x509name.rb
test_x509req.rb [ruby/openssl] Only CSR version 1 (encoded as 0) is allowed by PKIX standards 2024-04-26 16:55:15 +00:00
test_x509store.rb
ut_eof.rb
utils.rb Fix test_pkey_dh.rb in FIPS. 2023-11-25 10:12:28 +00:00