RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1777892 - openssl-pkcs11 does not support using RSA keys in FIPS mode
Summary: openssl-pkcs11 does not support using RSA keys in FIPS mode
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: openssl-pkcs11
Version: 8.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Anderson Sasaki
QA Contact: Alexander Sosedkin
Jan Fiala
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-28 15:47 UTC by Anderson Sasaki
Modified: 2020-04-28 16:58 UTC (History)
4 users (show)

Fixed In Version: openssl-pkcs11-0.4.10-2.el8
Doc Type: No Doc Update
Doc Text:
Described within the rebase description https://bugzilla.redhat.com/show_bug.cgi?id=1745082
Clone Of:
Environment:
Last Closed: 2020-04-28 16:58:10 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:1871 0 None None None 2020-04-28 16:58:16 UTC

Internal Links: 1827535

Description Anderson Sasaki 2019-11-28 15:47:04 UTC
Description of problem:
When trying to generate a signature using an RSA private key from a PKCS#11 device through the openssl-pkcs11 engine in FIPS mode, OpenSSL returns an error similar to:

RSA_new_method:non FIPS rsa method

Version-Release number of selected component (if applicable):
openssl-1.1.1c-9.el8.x86_64
openssl-pkcs11-0.4.10-1.el8.x86_64

How reproducible:
always

Steps to Reproduce:
The following reproducer requires softhsm and gnutls-utils installed.

1. Initialize a SoftHSM device
$ softhsm2-util --init-token --label softhsm --free --pin 1234 --so-pin 1234

2. Generate an RSA key pair
$ p11tool --generate-privkey=RSA --bits=2048 --login pkcs11:token=softhsm --set-pin=1234 --label=test

3. List objects (optional step)
$ p11tool --list-all --login pkcs11:token=softhsm?pin-value=1234

4. Generate an input file
$ echo secret > in.txt

5. Request a signature using the key from the device
$ openssl pkeyutl -engine pkcs11 -keyform engine -inkey "pkcs11:token=softhsm;object=test;type=private?pin-value=1234" -sign -out signature -in in.txt

Actual results:
engine "pkcs11" set.
PKCS11_get_private_key returned NULL
cannot load Private Key from engine
140026202888000:error:0406A0C8:rsa routines:RSA_new_method:non FIPS rsa method:crypto/rsa/rsa_lib.c:94:
140026202888000:error:26096080:engine routines:ENGINE_load_private_key:failed loading private key:crypto/engine/eng_pkey.c:78:
unable to load Private Key
pkeyutl: Error initializing context
Segmentation fault (core dumped)

Expected results:
Signature is successfully generated and output to the "signature" file

Additional info:
The core dump occurs due to a known issue in SoftHSM (see https://github.com/opendnssec/SoftHSMv2/pull/503)

Comment 5 errata-xmlrpc 2020-04-28 16:58:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:1871


Note You need to log in before you can comment on or make changes to this bug.