Murielle666 / eid-applet

Automatically exported from code.google.com/p/eid-applet
Other
0 stars 0 forks source link

Java 7 appletplugin and OS X #80

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Attached is a patch for the issues with oracle's java7 applet plugin and os x

In short following does not work properly

1. call CardTerminals.list twice while a card reader is connected and the 
applet plugin crashes with some crash log containing a blowup somewhere @ the 
jni level.

2. CardTerminal.waitForxxx and  CardTerminal.isCardPresent no workie since the 
update
Can work around this by trying to connect to the terminal and catching the card 
exception when failing

I still have sometimes issues when the applet is loaded and the card reader was 
not yet connected, especially with the Gemplus GemPC Twin 00 00 reader tho only 
in like 1 out of 15 tries :/

Original issue reported on code.google.com by wim.vand...@gmail.com on 17 Oct 2012 at 1:27

Attachments:

GoogleCodeExporter commented 9 years ago
Next perfectly works on a 1.7.0_09:

package test.integ.be.fedict.commons.eid.client;

import static org.junit.Assert.*;

import java.util.List;

import javax.smartcardio.CardTerminal;
import javax.smartcardio.CardTerminals;
import javax.smartcardio.TerminalFactory;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.Test;

public class PCSCTest {

        private static final Log LOG = LogFactory.getLog(PCSCTest.class);

        @Test
        public void testListCardTerminals() throws Exception {
                LOG.debug("java version: " + System.getProperty("java.version"));
                TerminalFactory terminalFactory = TerminalFactory.getDefault();
                CardTerminals cardTerminals = terminalFactory.terminals();
                List<CardTerminal> cardTerminalList = cardTerminals.list();
                LOG.debug("number of card terminals: " + cardTerminalList.size());
                for (CardTerminal cardTerminal : cardTerminalList) {
                        LOG.debug("card terminal name: " + cardTerminal.getName());
                }
                cardTerminals.list();
        }

}

Original comment by frank.co...@gmail.com on 19 Oct 2012 at 11:27

GoogleCodeExporter commented 9 years ago
Indeed new explosions on Mac OS X:
- method:       0x0000000114026480 {method} 'SCardListReaders' 
'(J)[Ljava/lang/String;' in 'sun/security/smartcardio/PCSC'
 - exceptions:   0x0000000113801d50
R14=0x00007f9fe916c1d8 is an unknown value
R15=0x0000000000000000 is an unknown value

Stack: [0x0000000177ae3000,0x0000000177be3000],  sp=0x0000000177be2720,  free 
space=1021k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libj2pcsc.dylib+0x166e]  pcsc_multi2jstring+0x11
C  [libj2pcsc.dylib+0x17f9]  
Java_sun_security_smartcardio_PCSC_SCardListReaders+0x72
j  sun.security.smartcardio.PCSC.SCardListReaders(J)[Ljava/lang/String;+0
j  sun.security.smartcardio.PCSCTerminals.waitForChange(J)Z+70
j  sun.security.smartcardio.PCSCTerminals.waitForChange(J)Z+53
j  be.fedict.commons.eid.client.CardAndTerminalManager.handlePCSCEvents()V+111
j  be.fedict.commons.eid.client.CardAndTerminalManager.run()V+17
j  java.lang.Thread.run()V+11
v  ~StubRoutines::call_stub
V  [libjvm.dylib+0x28893f]
V  [libjvm.dylib+0x288e1c]
V  [libjvm.dylib+0x288f56]
V  [libjvm.dylib+0x2bf8d0]
V  [libjvm.dylib+0x478694]
V  [libjvm.dylib+0x479b7a]
V  [libjvm.dylib+0x3b5595]
C  [libsystem_c.dylib+0x14782]  _pthread_start+0x147
C  [libsystem_c.dylib+0x11c1]  thread_start+0xd

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  sun.security.smartcardio.PCSC.SCardListReaders(J)[Ljava/lang/String;+0
j  sun.security.smartcardio.PCSCTerminals.waitForChange(J)Z+70
j  sun.security.smartcardio.PCSCTerminals.waitForChange(J)Z+53
j  be.fedict.commons.eid.client.CardAndTerminalManager.handlePCSCEvents()V+111
j  be.fedict.commons.eid.client.CardAndTerminalManager.run()V+17
j  java.lang.Thread.run()V+11
v  ~StubRoutines::call_stub

Original comment by frank.co...@gmail.com on 19 Oct 2012 at 11:34

GoogleCodeExporter commented 9 years ago
Is there already a complete build with this patch available?

Original comment by fredmatr...@gmail.com on 29 Oct 2012 at 1:47

GoogleCodeExporter commented 9 years ago
FedICT will soon issue an official communication for this.

Original comment by frank.co...@gmail.com on 1 Nov 2012 at 6:01

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
any news on this?

Original comment by debre...@gmail.com on 14 Nov 2012 at 3:11

GoogleCodeExporter commented 9 years ago
We will release an eID Applet version 1.1.0.Beta2 containing fixes for both Mac 
OS X and Windows 8.

Original comment by frank.co...@gmail.com on 20 Dec 2012 at 10:51

GoogleCodeExporter commented 9 years ago
The patch introduces a small bug. Fixed via: 
http://code.google.com/p/eid-applet/source/detail?r=746

Original comment by frank.co...@gmail.com on 15 Jan 2013 at 3:22

GoogleCodeExporter commented 9 years ago
Hi, 

Thanks for the patch :), will there be a eid-applet-js build download?
Or do we need to check this out manually and build it?

Thanks

Original comment by hoor...@gmail.com on 16 Jan 2013 at 1:27

GoogleCodeExporter commented 9 years ago
The latest eID Applet release (1.1.0.Beta4 already) contains this patch.

Original comment by frank.co...@gmail.com on 28 Jan 2013 at 11:21

GoogleCodeExporter commented 9 years ago
Where can I find this 1.1.0 beta 4 applet? I can't find it on this pages...

Original comment by fredmatr...@gmail.com on 30 Jan 2013 at 9:30

GoogleCodeExporter commented 9 years ago
http://www.e-contract.be/maven2/be/fedict/eid-applet/

Original comment by frank.co...@gmail.com on 30 Jan 2013 at 2:32

GoogleCodeExporter commented 9 years ago

Original comment by frank.co...@gmail.com on 27 Feb 2013 at 1:31

GoogleCodeExporter commented 9 years ago
Hi, I have the same error on MAC OS X 10.8.2 Java 7 64 bit. I also applied your 
suggestion, but still get the same error. Is the problem in PCSC driver 
(libj2pcsc.dylib)?
Best Regards
Valentin Ivanov

Original comment by Valentin...@gmail.com on 15 Mar 2013 at 2:41