Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1562572 - [RFE] Two backports for RHEL 7.5/Fedora 28 - better support for CloudHSM in FIPS mode
[RFE] Two backports for RHEL 7.5/Fedora 28 - better support for CloudHSM in F...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: opensc (Show other bugs)
7.4
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Jakub Jelen
Asha Akkiangady
Marc Muehlfeld
: FutureFeature
: 1557740 (view as bug list)
Depends On:
Blocks: 1563596
  Show dependency treegraph
 
Reported: 2018-03-31 23:25 EDT by aalba6675
Modified: 2018-10-30 07:25 EDT (History)
5 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-10-30 07:24:51 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Github https://github.com/OpenSC/OpenSC/issues/1285 None None None 2018-03-31 23:28 EDT
Github https://github.com/OpenSC/OpenSC/issues/1301 None None None 2018-03-31 23:25 EDT
Red Hat Product Errata RHBA-2018:3224 None None None 2018-10-30 07:25 EDT

  None (edit)
Description aalba6675 2018-03-31 23:25:19 EDT
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):
opensc-0.16.0-5.20170227git777e2a3.el7.x86_64

How reproducible:

Always

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)

3.

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 07:57:16 EDT
Here we talk about the following two upstream commits, that really makes sense to bring in:

https://github.com/OpenSC/OpenSC/commit/74885fb
https://github.com/OpenSC/OpenSC/commit/ea4baf5
Comment 7 Jakub Jelen 2018-04-25 12:40:45 EDT
*** Bug 1557740 has been marked as a duplicate of this bug. ***
Comment 11 Roshni 2018-08-17 17:12:40 EDT
[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 07:24:51 EDT
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-2018:3224

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