Details
-
Bug
-
Resolution: Fixed
-
P3
-
7
-
b15
-
x86
-
os_x
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8048375 | 8u25 | Ivan Gerasimov | P3 | Resolved | Fixed | b05 |
JDK-8043496 | 8u20 | Ivan Gerasimov | P3 | Resolved | Fixed | b20 |
JDK-8053631 | emb-8u26 | Ivan Gerasimov | P3 | Resolved | Fixed | b17 |
JDK-8044311 | 7u80 | Ivan Gerasimov | P3 | Resolved | Fixed | b01 |
JDK-8061026 | 7u79 | Ivan Gerasimov | P3 | Resolved | Fixed | b01 |
JDK-8057496 | 7u76 | Ivan Gerasimov | P3 | Resolved | Fixed | b01 |
JDK-8050347 | 7u75 | Ivan Gerasimov | P3 | Resolved | Fixed | b01 |
JDK-8043497 | 7u72 | Ivan Gerasimov | P3 | Closed | Fixed | b01 |
Description
java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Mac OS X 10.8.1
Darwin lambda.local 12.1.0 Darwin Kernel Version 12.1.0: Tue Aug 14 13:29:55 PDT 2012; root:xnu-2050.9.2~1/RELEASE_X86_64 x86_64
EXTRA RELEVANT SYSTEM CONFIGURATION :
Connected a ACR38U smartcardreader (CCID)
Inserted a Belgian eID card in the reader.
A DESCRIPTION OF THE PROBLEM :
Smartcards inserted in a smartcardreader are not detected by Oracle's Java 7 for Mac. It detects the reader, but not the card.
REGRESSION. Last worked in version 6u31
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
connect a reader and insert a smartcard. Then basically do this in Java:
TerminalFactory factory = TerminalFactory.getDefault();
CardTerminals cardTerminals = factory.terminals();
List<CardTerminal> cardTerminalList;
cardTerminalList = cardTerminals.list();
for (CardTerminal cardTerminal : cardTerminalList){
System.out.println(cardTerminal.getName());
if (cardTerminal.isCardPresent()) {
// not getting here
}
}
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Expected to detect the card. This works in Mac OS X's own Java 6 VM.
ACTUAL -
The card is not detected. The VM acts as if the reader is empty.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.smartcardio.*;
import java.util.List;
public class SmartCardBug {
public static void main(String[] args) {
TerminalFactory factory = TerminalFactory.getDefault();
CardTerminals cardTerminals = factory.terminals();
List<CardTerminal> cardTerminalList;
try {
cardTerminalList = cardTerminals.list();
for (CardTerminal cardTerminal : cardTerminalList) {
System.out.println(cardTerminal.getName());
cardTerminal.waitForCardPresent(10000);
if (cardTerminal.isCardPresent()) {
Card card;
try {
card = cardTerminal.connect("T=0");
card.beginExclusive();
} catch (CardException e) {
System.err.println("could not connect to card: "
+ e.getMessage());
continue;
}
ATR atr = card.getATR();
byte[] atrBytes = atr.getBytes();
StringBuffer atrStringBuffer = new StringBuffer();
for (byte atrByte : atrBytes) {
atrStringBuffer.append(Integer
.toHexString(atrByte & 0xff));
}
System.out.println("ATR= "
+ atrStringBuffer);
card.endExclusive();
card.disconnect(true);
}
}
} catch (CardException e) {
System.err.println("error on card terminals list: "
+ e.getMessage());
System.err.println("no card readers connected?");
Throwable cause = e.getCause();
if (null != cause) {
System.err.println("cause: " + cause.getMessage());
System.err.println("cause type: "
+ cause.getClass().getName());
}
}
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
We currently recommend our customers to deinstall Oracle's Java version and to stick with Apple's Java version.
Attachments
Issue Links
- backported by
-
JDK-8043496 javax.smartcardio does not detect cards on Mac OS X
-
- Resolved
-
-
JDK-8044311 javax.smartcardio does not detect cards on Mac OS X
-
- Resolved
-
-
JDK-8048375 javax.smartcardio does not detect cards on Mac OS X
-
- Resolved
-
-
JDK-8050347 javax.smartcardio does not detect cards on Mac OS X
-
- Resolved
-
-
JDK-8053631 javax.smartcardio does not detect cards on Mac OS X
-
- Resolved
-
-
JDK-8057496 javax.smartcardio does not detect cards on Mac OS X
-
- Resolved
-
-
JDK-8061026 javax.smartcardio does not detect cards on Mac OS X
-
- Resolved
-
-
JDK-8043497 javax.smartcardio does not detect cards on Mac OS X
-
- Closed
-
- duplicates
-
JDK-7200271 javax.smartcardio.CardTerminal.isCardPresent always returns false
-
- Closed
-