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 1710899 - opensc failure for ssh with myeid card
Summary: opensc failure for ssh with myeid card
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: opensc
Version: 7.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jakub Jelen
QA Contact: Scott Poore
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-16 14:26 UTC by Scott Poore
Modified: 2019-05-17 07:10 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-17 07:10:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
opensc debug log (450.91 KB, text/plain)
2019-05-16 14:28 UTC, Scott Poore
no flags Details

Description Scott Poore 2019-05-16 14:26:44 UTC
Description of problem:

Authentication with a MyEID Smart Card via ssh with an AD issued certificate is failing:

# ssh -I /usr/lib64/opensc-pkcs11.so -l ipauser1 localhost hostname
Enter PIN for 'sctest (MyEID)': 
C_Sign failed: 33
sign_and_send_pubkey: signing failed: error in libcrypto
no such identity: /root/.ssh/id_ed25519: No such file or directory
Password: 


I am able to su though with the same card/setup:

# su - ipauser1 -c "su - ipauser1 -c whoami"
PIN for sctest (MyEID)
ipauser1


Version-Release number of selected component (if applicable):
opensc-0.19.0-3.el7.x86_64


How reproducible:
always

Steps to Reproduce:
1.  Setup IPA Server and client for Smart Card Authentication
2.  add AD generated key/certificate to Smart Card
3.  ssh -I /usr/lib64/opensc-pkcs11.so -l ipauser1 localhost hostname


Actual results:
Failure as listed above

Expected results:
succeeds and returns hostname

Additional info:

Comment 2 Scott Poore 2019-05-16 14:28:26 UTC
Created attachment 1569531 [details]
opensc debug log

Comment 3 Scott Poore 2019-05-16 21:46:26 UTC
FYI, I realized the key was only 1024bit.  Having seen similar issues with weaker keys elsewhere, I tried regenerating my certificate with the key length set to 2048.  Now it's working as expected.

So, I'm not sure if we want to pursue this any further.  If so, I can give access to my card and system.  Otherwise, I think we can close this as NOTABUG.

Comment 4 Jakub Jelen 2019-05-17 07:10:47 UTC
Given that the problem is caused by the very small key size on a card we really do not officially support, I do not think we should spend more time on this.

I think this is a limitation of the RSA_PKCS mechanism (the card needs to add the PKCS#1.5 padding), but this error comes from inside of the card (the data size is fine for the PKCS#11 specification).


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