puppetlabs / puppetlabs/puppetserver-ca-cli

Incompatibility with OpenSSL 3.4 and later

Open
#124 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Ruby
Stars
4
Forks
25
Avg merge
41m
Merged PRs (30d)
1

Description

When running the testsuite in an environment using OpenSSL 3.4.0, many errors like the one below are raised:

  1) Puppetserver::Ca::Action::Generate downloading logs success and returns zero if downloaded                                                                                                                      
     Failure/Error: csr.version = 2                                                                                                                                                                                  
                                                                                                                                                                                                                     
     OpenSSL::X509::RequestError:                                                                                                                                                                                    
       X509_REQ_set_version: passed invalid argument                                                                                                                                                                 
     # ./lib/puppetserver/ca/host.rb:83:in `version='                                                                                                                                                                
     # ./lib/puppetserver/ca/host.rb:83:in `create_csr'                                                                                                                                                              
     # ./lib/puppetserver/ca/action/generate.rb:275:in `generate_key_csr'                                                                                                                                            
     # ./lib/puppetserver/ca/action/generate.rb:246:in `submit_csr'                                                                                                                                                  
     # ./lib/puppetserver/ca/action/generate.rb:222:in `block in generate_certs'                                                                                                                                     
     # ./lib/puppetserver/ca/action/generate.rb:216:in `map'                                                                                                                                                         
     # ./lib/puppetserver/ca/action/generate.rb:216:in `generate_certs'                                                                                                                                              
     # ./lib/puppetserver/ca/action/generate.rb:163:in `run'                                                                                                                                                         
     # ./spec/puppetserver/ca/action/generate_spec.rb:99:in `block (5 levels) in <top (required)>'                                                                                                                   
     # ./spec/utils/ssl.rb:91:in `with_temp_dirs'                                                                                                                                                                    
     # ./spec/puppetserver/ca/action/generate_spec.rb:98:in `block (4 levels) in <top (required)>'                                                                                                                   
     # ./spec/puppetserver/ca/action/generate_spec.rb:97:in `block (3 levels) in <top (required)>'                                                                                                                   

This occurs because the gem attempts to set a CSR version of 2, but this is no longer valid as of OpenSSL 3.4.0 and later, see commit https://github.com/openssl/openssl/commit/397051a40db2d68433b842e7505e8cf3c9effb36

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at lib/puppetserver/ca/host.rb:83, where create_csr assigns the CSR version, and review the OpenSSL compatibility context described in the issue. Run the affected example in spec/puppetserver/ca/action/generate_spec.rb:99 with OpenSSL 3.4 or later. Done means CSR generation succeeds and the relevant tests pass without the X509_REQ_set_version error.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
cryptography, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.