ruby/test/openssl
Job Snijders c78721f718 [ruby/openssl] Only CSR version 1 (encoded as 0) is allowed by PKIX standards
RFC 2986, section 4.1 only defines version 1 for CSRs. This version
is encoded as a 0. Starting with OpenSSL 3.3, setting the CSR version
to anything but 1 fails.

Do not attempt to generate a CSR with invalid version (which now fails)
and invalidate the CSR in test_sign_and_verify_rsa_sha1 by changing its
subject rather than using an invalid version.

This commit fixes the following error.

```
 2) Error: test_version(OpenSSL::TestX509Request): OpenSSL::X509::RequestError:
X509_REQ_set_version: passed invalid argument
/home/runner/work/openssl/openssl/test/openssl/test_x509req.rb:18:in `version='
/home/runner/work/openssl/openssl/test/openssl/test_x509req.rb:18:in `issue_csr'
/home/runner/work/openssl/openssl/test/openssl/test_x509req.rb:43:in
`test_version'
     40:     req = OpenSSL::X509::Request.new(req.to_der)
     41:     assert_equal(0, req.version)
     42:
  => 43:     req = issue_csr(1, @dn, @rsa1024, OpenSSL::Digest.new('SHA256'))
     44:     assert_equal(1, req.version)
     45:     req = OpenSSL::X509::Request.new(req.to_der)
     46:     assert_equal(1, req.version)
```

c06fdeb091
2024-11-20 10:18:27 +09:00
..
fixtures/pkey Fix test_pkey_dh.rb in FIPS. 2023-11-25 10:12:28 +00:00
test_asn1.rb [ruby/openssl] test_asn1.rb: Remove the assertions of the time string format without second. 2024-04-30 14:02:50 +09:00
test_bn.rb [ruby/openssl] Fix modular square root test with LibreSSL >= 3.8 2023-06-19 01:57:09 +09:00
test_buffering.rb
test_cipher.rb [ruby/openssl] Use openssl? instead of OpenSSL::OPENSSL_VERSION_NUMBER. 2023-08-16 14:48:42 +09:00
test_config.rb [ruby/openssl] config: relax test assertions against error messages 2023-08-16 14:48:41 +09:00
test_digest.rb [ruby/openssl] Prefer String#unpack1 2023-09-06 19:24:53 +09:00
test_engine.rb [ruby/openssl] Remove OSSL_DEBUG compile-time option 2023-09-06 19:20:57 +09:00
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 [ruby/openssl] Revert "Skip OpenSSL::TestHMAC#test_dup when running with RHEL9" 2023-05-19 09:25:11 +09:00
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] Let OpenSSL choose the digest if digest for Openssl::OCSP::BasicResponse#sign is nil. 2022-07-08 23:18:22 +09: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] test/openssl/test_ssl.rb: do not run SSL tests if not available 2022-12-23 09:39:15 +09:00
test_pkcs7.rb
test_pkcs12.rb [ruby/openssl] Prefer String#unpack1 2023-09-06 19:24:53 +09: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] Prefer String#unpack1 2023-09-06 19:24:53 +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 Skip broken SSL provider tests for freebsd 2024-05-29 09:59:52 -07:00
test_random.rb
test_ssl.rb [ruby/openssl] ssl: raise SSLError if loading ca_file or ca_path fails 2023-08-16 14:48:41 +09:00
test_ssl_session.rb [ruby/openssl] Prefer String#unpack1 2023-09-06 19:24:53 +09:00
test_ts.rb
test_x509attr.rb
test_x509cert.rb [ruby/openssl] Use SHA256 instead of SHA1 where needed in tests. 2022-12-13 18:07:41 +09:00
test_x509crl.rb [ruby/openssl] Use SHA256 instead of SHA1 where needed in tests. 2022-12-13 18:07:41 +09:00
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-11-20 10:18:27 +09:00
test_x509store.rb
ut_eof.rb
utils.rb Fix test_pkey_dh.rb in FIPS. 2023-11-25 10:12:28 +00:00