Bug 1299998

Summary: ssh client checks only the first certificate on a smartcard when the card has multiple certs
Product: Red Hat Enterprise Linux 6 Reporter: Roshni <rpattath>
Component: doc-Identity_Management_GuideAssignee: Marc Muehlfeld <mmuehlfe>
Status: CLOSED NOTABUG QA Contact: Namita Soman <nsoman>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.8CC: mmuehlfe, rhel-docs
Target Milestone: rcKeywords: Documentation
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-29 13:08:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Roshni 2016-01-19 17:28:56 UTC
Document URL: 

Section Number and Name: 

Describe the issue: 

ssh client checks only the first certificate on a smartcard when the card has multiple certs. If the first certificate is revoked and ocsp checking is enabled ssh to smartcard user fails eventhough the card has other certificates that are valid.

Version-Release number of selected component (if applicable):
openssh-5.3p1-113.el6

How reproducible:
always

Steps to Reproduce:
1. A smartcard has a revoked certificate and a valid certificate generated by IPA
2. ssh-add -s <location of pkcs11 lib>
3. ssh -I
/usr/lib64/pkcs11/opensc-pkcs11.so -l ipasmartcarduser5 localhost

Actual results:

Output of step 2:

[rpattath@dhcp123-129 ~]$ ssh-add -s /usr/lib64/pkcs11/opensc-pkcs11.so
Enter passphrase for PKCS#11:
SSH_AGENT_FAILURE
Could not add card: /usr/lib64/pkcs11/opensc-pkcs11.so

Output of step 3:
Prompts for user password and not smartcard pin

Expected results:

Step 2 should add the key of the valid cert on the card to ssh-agent

step 3 should prompt for smartcard pin (by detecting the vaild certificate on the smartcard)

Suggestions for improvement: 

Additional information:

Comment 3 Marc Muehlfeld 2016-11-29 13:08:29 UTC
Sumit Bose let me know that this was not sshd-related. It was a bug in SSSD that is meanwhile fixed. For details, see comment #25 and #26 in BZ#1299994.

I'm closing this BZ.