Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-5590

ruby:3.1/ruby: Ruby cannot read private key in FIPS mode on RHEL 9 [rhel-9]

    • ruby-3.1.2-142.module_el9+787+b20bfeee (CentOS Stream), ruby-3.1.2-142.module+el9.4.0+21038+70f870c9 (RHEL)
    • None
    • Important
    • ZStream
    • rhel-sst-pt-python-ruby-nodejs
    • ssg_core_services
    • 4
    • 15
    • 3
    • Dev ack
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • Approved Blocker
    • Pass
    • None
    • If docs needed, set a value
    • None

      Description of problem:

      With a FIPS enabled RHEL 9 system, a Ruby script that reads in a private key fails to do so. The same key can be read without FIPS enabled.

      Version-Release number of selected component (if applicable):
      Any Ruby version on RHEL 9.

      How reproducible:
      Always

      Steps to Reproduce:
      1. Acquire a RHEL 9 host with FIPS enabled
      2. Register the machine

      3. dnf module enable ruby
      4. dnf install ruby
      5. ruby -e "require 'openssl';OpenSSL::PKey.read(File.read('/etc/pki/consumer/key.pem'))"

      Actual results:

      -e:1:in `read': Could not parse PKey (OpenSSL::PKey::PKeyError)
      from -e:1:in `<main>'

      Expected results:

      No errors

      Additional info:

      This issue was discovered when attempting to run Red Hat Satellite's foreman_scap_client script. The related BZ – https://bugzilla.redhat.com/show_bug.cgi?id=2168931

              jprokop@redhat.com Jarek Prokop
              ehelms@redhat.com Eric Helms
              Lukas Zachar Lukas Zachar
              Votes:
              0 Vote for this issue
              Watchers:
              16 Start watching this issue

                Created:
                Updated:
                Resolved: