Bug 741193

Summary: PKCS#15 binding failed: Wrong length
Product: [Fedora] Fedora Reporter: Juha Tuomala <tuju>
Component: openscAssignee: Tomas Mraz <tmraz>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: kalevlember, tmraz
Target Milestone: ---Keywords: MoveUpstream, Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-01 14:09:54 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Juha Tuomala 2011-09-26 04:21:52 EDT
Description of problem:
While trying to use Firefox with PKI-card and X.509 certificate,  these days it's typical that connection fails at startup. If using pkcs15-tool, you can get given error which is most likely to cause the problems with browser through a opensc-pkcs11.so plugin.

Version-Release number of selected component (if applicable):
opensc-0.12.2-1.fc15.x86_64

How reproducible:
Very often, could say always.

Steps to Reproduce:
1. Insert a PKI card
2. % pkcs15-tool -c
3. PKCS#15 binding failed: Wrong length
  
Actual results:
% pkcs15-tool -c
Using reader with a card: OmniKey CardMan 1021 00 00
PKCS#15 binding failed: Wrong length
% pkcs15-tool -c
Using reader with a card: OmniKey CardMan 1021 00 00
^C
% pkcs15-tool -c
Using reader with a card: OmniKey CardMan 1021 00 00
X.509 Certificate ...

Expected results:
Sertificate details instantly as in third attempt above.

Additional info:
By doing this 'milking' repeatedly and after it gives sertificate details, the firefox starts working as well.
Comment 1 Tomas Mraz 2011-09-26 04:31:52 EDT
This looks like an error caused by a bug in some lower layers - perhaps in the communication with the card reader (pcsc-lite library).

Unfortunately I cannot help you much with this problem as I do not have such hardware. It needs to be reported and investigated upstream.
Comment 2 Juha Tuomala 2011-09-26 04:45:44 EDT
They're aware of it, it has existed for months (or over a year maybe), where ever that bug actually is, I guess there are more important matters than this one.

For regular users this probably appears like broken software and is quite big showstopper if they can't log in into internet bank etc secure services. So I'd keep this bug for tracking this issue for fedora users.
Comment 3 Kalev Lember 2011-09-26 08:34:08 EDT
Could you also file this bug with the upstream issue tracker and post the link here, please?

http://www.opensc-project.org/opensc
Comment 4 Juha Tuomala 2011-10-21 09:42:31 EDT
No, I can't. Go ahead and do it yourself.
Comment 5 Tomas Mraz 2011-10-21 10:05:49 EDT
Unfortunately I cannot reproduce the bug myself (I have not the hardware needed.) and so I will not report it upstream as I wouldn't be able to answer any questions from the upstream anyway.
Comment 6 Juha Tuomala 2011-10-21 11:10:40 EDT
Does every bug need to be reproduced to be escalated? I'm pretty sure that whoever wrote that piece of code, has a hardware also. From that error message, it's quite obvious what happens inside that code.

After all, opensc is for 'smart cards', what's the point of maintaining a package without related hardware if everything must be reproduced?
Comment 7 Fedora End Of Life 2012-08-06 16:04:35 EDT
This message is a notice that Fedora 15 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 15. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 15 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 8 Fedora End Of Life 2012-08-06 16:04:35 EDT
This message is a notice that Fedora 15 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 15. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 15 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 9 Juha Tuomala 2012-08-07 04:35:10 EDT
This still exists.
Comment 10 Juha Tuomala 2012-10-04 04:25:22 EDT
I was told that this is most likely caused by a new-card-old-opensc combination. Brief glimpse to the situation didn't make it clear what the whole picture is, would upgrading opensc break DigiDoc, browser plugins etc.

Some information about the topic in official PKI-language:

http://martinpaljak.net/2011/11/10/debian-ja-id-kaardi-tarkvara/
Comment 11 Fedora End Of Life 2013-07-04 02:34:48 EDT
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 12 Fedora End Of Life 2013-08-01 14:09:57 EDT
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.