-
Bug
-
Resolution: Fixed
-
P3
-
6
-
b135
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8183725 | 8u161 | Ivan Gerasimov | P3 | Resolved | Fixed | b01 |
JDK-8165021 | 8u152 | Ivan Gerasimov | P3 | Resolved | Fixed | b01 |
JDK-8173435 | 8u151 | Ivan Gerasimov | P3 | Resolved | Fixed | b01 |
JDK-8177202 | 8u141 | Unassigned | P3 | Resolved | Fixed | b01 |
JDK-8172428 | 8u131 | Ivan Gerasimov | P3 | Resolved | Fixed | b02 |
JDK-8192461 | emb-8u161 | Ivan Gerasimov | P3 | Resolved | Fixed | b01 |
JDK-8184572 | emb-8u151 | Unassigned | P3 | Resolved | Fixed | b01 |
JDK-8178634 | emb-8u141 | Unassigned | P3 | Resolved | Fixed | b01 |
JDK-8173551 | emb-8u131 | Ivan Gerasimov | P3 | Resolved | Fixed | b02 |
JDK-8165022 | 7u131 | Ivan Gerasimov | P3 | Resolved | Fixed | b01 |
JDK-8180975 | openjdk7u | Ivan Gerasimov | P3 | Resolved | Fixed | master |
JDK-8165023 | 6u141 | Ivan Gerasimov | P3 | Resolved | Fixed | b01 |
====================
Method "public abstract javax.smartcardio.CardTerminal.connect(String protocol)" of Sun's implementation of "PC/SC" smartcard reader I/O engine works wrong on Linux. In case when card is absent in card reader this method throws CardException instead of CardNotPresentException, in the same time method "javax.smartcardio.CardTerminal.isCardPresent()" works properly - it returns "false".
This bug is specific for Linux only, it is absent on Windows.
Test system description:
SuSE 10.0 out of box on Intel Pentium IV;
GemPCTwin (serial version) smartcard reader.
PC/SC framework and drivers from GemPlus site (SuSE package):
http://support.gemplus.com/gemdownload/readers/drivers.aspx?prodid=13&osid=11
There is a minimized test below:
Minimized test:
===============
---test.java---
import javax.smartcardio.*;
public class test {
public static void main(String[] args) {
CardTerminals terminals = TerminalFactory.getDefault().terminals();
try {
if (!terminals.list().isEmpty()) {
CardTerminal terminal = terminals.list().get(0);
if(!terminal.isCardPresent()) {
System.out.println("CardTerminal.isCardPresent():"
+ terminal.isCardPresent());
try {
Card card = terminal.connect("*");
} catch (CardNotPresentException e) {
System.out.println("Bug is absent: " + e);
} catch(CardException e) {
e.printStackTrace();
}
} else {
System.out.println("Bug cannot be reproduced: Card is"
+ " present");
}
} else {
System.out.println("Bug cannot be reproduced:There are no"
+ " any card terminals");
}
} catch(CardException e) {
}
}
}
---test.java---
Minimized test output:
======================
[vs158239@vsmelov bug]$ javac test.java
[vs158239@vsmelov bug]$ java -cp ./ test
CardTerminal.isCardPresent():false
javax.smartcardio.CardException: connect() failed
at sun.security.smartcardio.TerminalImpl.connect(TerminalImpl.java:67)
at test.main(test.java:14)
Caused by: sun.security.smartcardio.PCSCException: SCARD_E_NO_SMARTCARD
at sun.security.smartcardio.PCSC.SCardConnect(Native Method)
at sun.security.smartcardio.CardImpl.<init>(CardImpl.java:65)
at sun.security.smartcardio.TerminalImpl.connect(TerminalImpl.java:61)
... 1 more
- backported by
-
JDK-8165021 (smartcardio) CardTerminal.connect() throws CardException instead of CardNotPresentException
- Resolved
-
JDK-8165022 (smartcardio) CardTerminal.connect() throws CardException instead of CardNotPresentException
- Resolved
-
JDK-8165023 (smartcardio) CardTerminal.connect() throws CardException instead of CardNotPresentException
- Resolved
-
JDK-8172428 (smartcardio) CardTerminal.connect() throws CardException instead of CardNotPresentException
- Resolved
-
JDK-8173435 (smartcardio) CardTerminal.connect() throws CardException instead of CardNotPresentException
- Resolved
-
JDK-8173551 (smartcardio) CardTerminal.connect() throws CardException instead of CardNotPresentException
- Resolved
-
JDK-8177202 (smartcardio) CardTerminal.connect() throws CardException instead of CardNotPresentException
- Resolved
-
JDK-8178634 (smartcardio) CardTerminal.connect() throws CardException instead of CardNotPresentException
- Resolved
-
JDK-8180975 (smartcardio) CardTerminal.connect() throws CardException instead of CardNotPresentException
- Resolved
-
JDK-8183725 (smartcardio) CardTerminal.connect() throws CardException instead of CardNotPresentException
- Resolved
-
JDK-8184572 (smartcardio) CardTerminal.connect() throws CardException instead of CardNotPresentException
- Resolved
-
JDK-8192461 (smartcardio) CardTerminal.connect() throws CardException instead of CardNotPresentException
- Resolved