Skip to content

openssl-master: rake test_fips failures about keys #926

@junaruga

Description

@junaruga

I executed the current latest master branch dfbbac6 with the latest OpenSSL master branch openssl/openssl@b20da23 in my forked repository today. I am seeing the failures in the FIPS tests below.

https://github.com/junaruga/ruby-openssl/actions/runs/16680199093/job/47216748820

$ sed -e "s|OPENSSL_DIR|$HOME/openssl|" tool/openssl_fips.cnf.tmpl > tmp/openssl_fips.cnf
$ export OPENSSL_CONF=$(pwd)/tmp/openssl_fips.cnf
$ bundle exec rake debug
$ bundle exec rake test_fips TESTOPTS="-v --no-show-detail-immediately" OSSL_TEST_ALL=1
...
  1) Error: test_check_key(OpenSSL::TestEC): OpenSSL::PKey::PKeyError: Could not parse PKey
/home/runner/work/openssl/openssl/test/openssl/test_pkey_ec.rb:102:in `read'
/home/runner/work/openssl/openssl/test/openssl/test_pkey_ec.rb:102:in `test_check_key'
      99:     if aws_lc? # AWS-LC automatically does key checks on the parsed key.
     100:       assert_raise(OpenSSL::PKey::PKeyError) { OpenSSL::PKey.read(ec_key_data) }
     101:     else
  => 102:       key4 = OpenSSL::PKey.read(ec_key_data)
     103:       assert_raise(OpenSSL::PKey::ECError) { key4.check_key }
     104:     end
     105: 
Error: OpenSSL::PKey::PKeyError: Could not parse PKey
/home/runner/work/openssl/openssl/test/openssl/test_pkey_ec.rb:102:in `read'
/home/runner/work/openssl/openssl/test/openssl/test_pkey_ec.rb:102:in `test_check_key'

  2) Error: test_dh_compute_key(OpenSSL::TestEC): OpenSSL::PKey::ECError: EC_KEY_generate_key: unable to create drbg
/home/runner/work/openssl/openssl/test/openssl/test_pkey_ec.rb:180:in `generate'
/home/runner/work/openssl/openssl/test/openssl/test_pkey_ec.rb:180:in `test_dh_compute_key'
     177:   end
     178: 
     179:   def test_dh_compute_key
  => 180:     key_a = OpenSSL::PKey::EC.generate("prime256v1")
     181:     key_b = OpenSSL::PKey::EC.generate(key_a.group)
     182: 
     183:     pub_a = key_a.public_key
Error: OpenSSL::PKey::ECError: EC_KEY_generate_key: unable to create drbg
...
278 tests, 686 assertions, 0 failures, 170 errors, 0 pendings, 24 omissions, 0 notifications
33.0709% passed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions