Skip to content

Commit

Permalink
Add back regress coverage for CSR version setting
Browse files Browse the repository at this point in the history
  • Loading branch information
botovq committed Apr 26, 2024
1 parent 8584333 commit 425c0d7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/openssl/test_x509req.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,18 @@ def test_version
assert_equal(0, req.version)
req = OpenSSL::X509::Request.new(req.to_der)
assert_equal(0, req.version)

# There is no CSR version 2. Recent versions refuse to set it.
if openssl?(3, 3, 0) or libressl?(4, 0, 0)
assert_raise (OpenSSL::X509::RequestError) {
req.version = 1
}
else
req.version = 1
end

# The only specified version 1 can always be set.
req.version = 0
end

def test_subject
Expand Down

0 comments on commit 425c0d7

Please sign in to comment.