Mailing List Archive

[Bug 584] scard-opensc.c doesn't work without PIN
http://bugzilla.mindrot.org/show_bug.cgi?id=584

Summary: scard-opensc.c doesn't work without PIN
Product: Portable OpenSSH
Version: -current
Platform: All
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Smartcard
AssignedTo: openssh-bugs@mindrot.org
ReportedBy: larsch@trustcenter.de


The function sc_prkey_op_init (in scard-opensc.c) requires for every private
key a PKCS#15 AuthenticationObject object, but the this object is optional
=> sc_prkey_op_init fails if the key is not protected by a PIN.
If sc_pkcs15_find_pin_by_auth_id retuns SC_ERROR_OBJECT_NOT_FOUND then
(most likely) a PIN is not required to use the key => sc_prkey_op_init
should simply copy the private key and return 0 (== no error).

Regards,
Nils



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 584] scard-opensc.c doesn't work without PIN [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=584





------- Additional Comments From larsch@trustcenter.de 2003-06-03 19:10 -------
Created an attachment (id=318)
--> (http://bugzilla.mindrot.org/attachment.cgi?id=318&action=view)
proposed patch




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 584] scard-opensc.c doesn't work without PIN [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=584

djm@mindrot.org changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED



------- Additional Comments From djm@mindrot.org 2003-06-04 19:22 -------
Fix applied, thanks.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 584] scard-opensc.c doesn't work without PIN [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=584

larsch@trustcenter.de changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #318 is|0 |1
obsolete| |



------- Additional Comments From larsch@trustcenter.de 2003-06-04 22:03 -------
Created an attachment (id=322)
--> (http://bugzilla.mindrot.org/attachment.cgi?id=322&action=view)
fixed proposed patch

Sorry Damien, but I overlooked that sc_prkey_op_init is expected to
lock the card. With this patch (and with #577) I can use a PKCS#15 smart
card with OpenSSH (v1,v2) via OpenSC under Linux and Windows (+Cygwin)
(using ssh-agent or 'ssh -I ...' if the key is not protected by a PIN).

Thanks,
Nils



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 584] scard-opensc.c doesn't work without PIN [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=584

larsch@trustcenter.de changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |



------- Additional Comments From larsch@trustcenter.de 2003-06-04 22:06 -------
Sorry, but I overlooked a missing sc_lock.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 584] scard-opensc.c doesn't work without PIN [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=584

djm@mindrot.org changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED



------- Additional Comments From djm@mindrot.org 2003-06-04 22:12 -------
Applied too, thanks.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 584] scard-opensc.c doesn't work without PIN [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=584

larsch@trustcenter.de changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |VERIFIED





------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.