- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Communicating with Smart card on Linux machine...
Operating System - Linux
1752772
Members
5203
Online
108789
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2008 10:17 PM
12-28-2008 10:17 PM
Communicating with Smart card on Linux machine(Fedora 8)
I have a problem in communicating with Smart card on Linux machine,
the card im using is SLE-4428 and ACR38 is my card reader. In specific I have a problem with protocol which I am using for establishing connection with card. Is there a way to specify the
card type to the driver? Any help would be appriciated.
Code Snippet that I am executing is:
TerminalFactory factory = TerminalFactory.getDefault();
List terminals = factory.terminals().list();
terminal = (CardTerminal) terminals.get(0);
card = terminal.connect("T=0");
terminal.connect("T=0") statement is throwing an exception, details are as specified below:
javax.smartcardio.CardException: connect() failed
Caused by: sun.security.smartcardio.PCSCException: SCARD_E_PROTO_MISMATCH
at sun.security.smartcardio.PCSC.SCardConnect(Native Method)
at sun.security.smartcardio.CardImpl.(CardImpl.java:83)
at sun.security.smartcardio.TerminalImpl.connect(TerminalImpl.java:79)
... 22 more
The same code is working fine in Windows XP.
the card im using is SLE-4428 and ACR38 is my card reader. In specific I have a problem with protocol which I am using for establishing connection with card. Is there a way to specify the
card type to the driver? Any help would be appriciated.
Code Snippet that I am executing is:
TerminalFactory factory = TerminalFactory.getDefault();
List terminals = factory.terminals().list();
terminal = (CardTerminal) terminals.get(0);
card = terminal.connect("T=0");
terminal.connect("T=0") statement is throwing an exception, details are as specified below:
javax.smartcardio.CardException: connect() failed
Caused by: sun.security.smartcardio.PCSCException: SCARD_E_PROTO_MISMATCH
at sun.security.smartcardio.PCSC.SCardConnect(Native Method)
at sun.security.smartcardio.CardImpl.
at sun.security.smartcardio.TerminalImpl.connect(TerminalImpl.java:79)
... 22 more
The same code is working fine in Windows XP.
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2008 05:01 PM
12-29-2008 05:01 PM
Re: Communicating with Smart card on Linux machine(Fedora 8)
By a quick Googling, the "SCARD_E_PROTO_MISMATCH" seems to indicate the protocol you're using is not supported by the card.
The datasheet I found for the SLE-4428 card did not seem to mention the protocol(s) supported by the card.
Have you tried allowing the system to autodetect the card protocol? I.e.:
card = terminal.connect("*");
If this works, and your original code works _with the same card_ in Windows XP, it may be the Windows XP driver is ignoring the protocol specification from your program and using whatever protocol seems to be workable.
This might happen e.g. because the interface between Java and the native smartcard API of Windows might not allow (or implement) forcing a particular protocol. In Linux, the Java is using the PC/SC smart card interface; in Windows, the interface might be SCard COM.
Disclaimer: I don't know too much about smart card programming details; just Googling and browsing the docs...
MK
The datasheet I found for the SLE-4428 card did not seem to mention the protocol(s) supported by the card.
Have you tried allowing the system to autodetect the card protocol? I.e.:
card = terminal.connect("*");
If this works, and your original code works _with the same card_ in Windows XP, it may be the Windows XP driver is ignoring the protocol specification from your program and using whatever protocol seems to be workable.
This might happen e.g. because the interface between Java and the native smartcard API of Windows might not allow (or implement) forcing a particular protocol. In Linux, the Java is using the PC/SC smart card interface; in Windows, the interface might be SCard COM.
Disclaimer: I don't know too much about smart card programming details; just Googling and browsing the docs...
MK
MK
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP