Bug 1562572 - [RFE] Two backports for RHEL 7.5/Fedora 28 - better support for CloudHSM in FIPS mode
Summary: [RFE] Two backports for RHEL 7.5/Fedora 28 - better support for CloudHSM in F...
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: opensc
Version: 7.4
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Jakub Jelen
QA Contact: Asha Akkiangady
Marc Muehlfeld
: 1557740 (view as bug list)
Depends On:
Blocks: 1563596
TreeView+ depends on / blocked
Reported: 2018-04-01 03:25 UTC by aalba6675
Modified: 2018-10-30 11:25 UTC (History)
5 users (show)

Fixed In Version: opensc-0.16.0-9.20170227git777e2a3.el7
Doc Type: Bug Fix
Doc Text:
The *pkcs11-tool* utility now supports mechanism IDs and handles ECDSA keys correctly Previously, the *pkcs11-tool* utility incorrectly handled *EC_POINT* values and support for certain vendor-specific mechanisms was missing. As a consequence, these mechanisms and certain ECDSA keys in hardware security modules (HSM) and smart cards were not supported by *pkcs11-tool*. With this update, the *pkcs11-tool* now handles *EC_POINT* values and vendor-specific mechanisms correctly. As a result, the utility now supports mechanism IDs and handles ECDSA keys correctly.
Clone Of:
Last Closed: 2018-10-30 11:24:51 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github https://github.com/OpenSC OpenSC issues 1285 0 None None None 2020-03-19 07:45:53 UTC
Github https://github.com/OpenSC OpenSC issues 1301 0 None None None 2020-03-19 07:45:53 UTC
Red Hat Product Errata RHBA-2018:3224 0 None None None 2018-10-30 11:25:07 UTC

Description aalba6675 2018-04-01 03:25:19 UTC
Description of problem:

I have two PRs in upstream accepted for better support of CloudHSM in FIPS mode. They address two separate issues:

1. Write EC public key objects with full DER (instead of just the content bytes)
2. Specify mechanism for RSA key generation in hexadecimal (for vendor proprietary mechanisms). In FIPS mode SafeNet uses 0x8000014 0x80000143 instead of 0x0 and 0xA

Version-Release number of selected component (if applicable):

How reproducible:


Steps to Reproduce:
Put CloudHSM/SafeNet Luna in FIPS mode

1. pkcs11-tool --module /usr/lib/libCryptoki2_64.so --slot 0 --pin PIN --login --write ec_publickey.der

- will fail as we are not sending the correct bytes (missing ASN.1 TL)

2. pkcs11-tool --module /usr/lib/libCryptoki2_64.so --slot 0 --pin PIN --login --keypairgen --key-type RSA:2048

- will fail, SafeNet needs -m 0x80000142 or -m 0x80000143 (possible with the PR)


Actual results:
Both operations fail

Expected results:
Both operations succeed

Additional info:
Accepted by upstream

1. Fix EC public key(send complete DER): bytes https://github.com/OpenSC/OpenSC/pull/1287
2. Accept hexadecimal for mechanism: https://github.com/OpenSC/OpenSC/pull/1302

Please backport to RHEL 7.5 and Fedora 28.

Comment 3 Jakub Jelen 2018-04-03 11:57:16 UTC
Here we talk about the following two upstream commits, that really makes sense to bring in:


Comment 7 Jakub Jelen 2018-04-25 16:40:45 UTC
*** Bug 1557740 has been marked as a duplicate of this bug. ***

Comment 11 Roshni 2018-08-17 21:12:40 UTC
[root@dhcp129-188 ~]# rpm -qi opensc
Name        : opensc
Version     : 0.16.0
Release     : 10.20170227git777e2a3.el7
Architecture: x86_64
Install Date: Tue 31 Jul 2018 10:10:39 AM EDT
Group       : System Environment/Libraries
Size        : 3260617
License     : LGPLv2+
Signature   : RSA/SHA256, Tue 03 Jul 2018 04:12:33 AM EDT, Key ID 199e2f91fd431d51
Source RPM  : opensc-0.16.0-10.20170227git777e2a3.el7.src.rpm
Build Date  : Tue 03 Jul 2018 03:59:44 AM EDT
Build Host  : x86-019.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor      : Red Hat, Inc.
URL         : https://github.com/OpenSC/OpenSC/wiki
Summary     : Smart card library and applications

Sanity tests look good.

Comment 13 errata-xmlrpc 2018-10-30 11:24:51 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.


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