Comments (7)
Currently the ATR is not propagated from pcsc-relay to vpcd. If you want to see the correct(tm) ATR, try changing https://github.com/frankmorgner/vsmartcard/blob/master/pcsc-relay/src/vicc.c#L80 to 3B 8A 80 01 80 31 B8 73 84 01 E0 82 90 00 06
.
The problem you've encountered seems to be in the wave's firmware itself, which is why the transmission fails. Obviously, it doesn't correctly parse or respond to the pseudo APDU FF 9A 04 02 00 00 07 30 05 A1 03 02 01 02 FF FF
. You should be able to reproduce this problem locally (i.e. without pcsc-relay).
- You should check whether there is a new firmware for the wave (you need Windows for this).
- If there is not, you could check with BSI TR-03119 if it is encoded correctly with npa-tool (I'm pretty confident it is, because I think I've tested this successfully).
- If it is correct then report the problem to Reiner SCT.
from vsmartcard.
Thanks for the fast reply.
Locally the behavior is a bit different. The eID-functions work (sorta, Selbstauskunft has trouble with the redirect).
With the npa-tool the PACE channel gets established with eID PIN/ CAN. Input on the reader works there.
After that is has an error. I saw the same error with the relay, when the reader crashed, but thought the crash would cause it.
% npa-tool -p :(
Established PACE channel with eID PIN.
lt-npa-tool: /home/malte/code/vsmartcard/npa/./src/opensc/src/libopensc/card.c:338: sc_disconnect_card: Assertion `card->lock_count == 0' failed.
[1] 950 abort (core dumped) npa/src/npa-tool -p
While I see FF 9A 04 02 00 00 07 30 05 A1 03 02 01 03 FF FF
in the more verbose npa-tool output via relay, locally it goes directly from the incoming PACECapabilities-APDU to perform_pace.
Output in question from npa-tool -vvv -p:
0x7fb48e616700 18:29:21.886 [] reader-pcsc.c:270:pcsc_transmit:
Outgoing APDU (4 bytes):
FF 9A 04 01 ....
0x7fb48e616700 18:29:21.886 [] reader-pcsc.c:199:pcsc_internal_transmit: called
0x7fb48e616700 18:29:21.888 [] reader-pcsc.c:279:pcsc_transmit:
Incoming APDU (24 bytes):
30 14 A1 03 01 01 FF A2 03 01 01 FF A3 03 01 01 0...............
00 A4 03 01 01 FF 90 00 ........
0x7fb48e616700 18:29:21.888 [] reader-pcsc.c:199:pcsc_internal_transmit: called
0x7fb48e616700 18:29:30.561 [] npa.c:1468:perform_pace: returning with: 0 (Success)
Established PACE channel with eID PIN.
Firmware should be up to date, but I'll verify that at home.
from vsmartcard.
A core dump should never happen. Could you run npa-tool in gdb or with valgrind?
I've migrated nPA directly to https://github.com/frankmorgner/OpenSC. Could you check if this version is also affected?
from vsmartcard.
I think something like gdb npa-tool core
should also give some details. Compiling with CFLAGS="-g -O0"
also helps.
from vsmartcard.
I hope this helps.
Output from gdb:
% gdb /tmp/install/bin/npa-tool core_dump
Reading symbols from /tmp/install/bin/npa-tool...done.
[New LWP 13731]
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `/tmp/install/bin/npa-tool -vvv -p'.
Program terminated with signal SIGABRT, Aborted.
#0 0x00007fd56a2c004f in raise () from /usr/lib/libc.so.6
(gdb) r -p
Starting program: /tmp/install/bin/npa-tool -p
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Established PACE channel with eID PIN.
npa-tool: /home/malte/code/vsmartcard/npa/./src/opensc/src/libopensc/card.c:338: sc_disconnect_card: Assertion `card->lock_count == 0' failed.
Program received signal SIGABRT, Aborted.
0x00007ffff685a04f in raise () from /usr/lib/libc.so.6
stack trace from coredumpctl:
Stack trace of thread 13731:
#0 0x00007fd56a2c004f raise (libc.so.6)
#1 0x00007fd56a2c147a abort (libc.so.6)
#2 0x00007fd56a2b8ea7 __assert_fail_base (libc.so.6)
#3 0x00007fd56a2b8f52 __assert_fail (libc.so.6)
#4 0x00007fd56b62b96a sc_disconnect_card (libnpa.so.0)
#5 0x0000000000404491 main (npa-tool)
#6 0x00007fd56a2ad291 __libc_start_main (libc.so.6)
#7 0x0000000000401dda _start (npa-tool)
The version from OpenSC is not affected.
card.c:362:sc_disconnect_card: returning with: 0 (Success)
from vsmartcard.
Thanks for the feedback. I won't investigate in libnpa further. Please use the OpenSC version. Are there any other problems left?
from vsmartcard.
No, thanks again.
I verified pseudo APDU with the tr-03119 and contacted Rainer SCT.
from vsmartcard.
Related Issues (20)
- Not able to compile the code of Virtual Smart Card Reader because of missing file or module "VirtualSCReaderDriver" in the solution HOT 3
- virtualsmartcard-0.9_win64 installation fails HOT 1
- Can i use it just like nfcgate? HOT 1
- vicc emulates an Unsupported card HOT 1
- vicc dont work HOT 2
- Support max reader num? HOT 1
- Reader not supported since class 2/3 required. HOT 2
- Problem connecting to virtual reader HOT 12
- Relaying a contact-based smart card with pcsc-relay NOT working NEED help HOT 6
- Network traffic security HOT 4
- android smart card emulator HOT 1
- make install error at virtualsmartcard HOT 1
- Can ccid-emulator be used with FunctionFS? HOT 1
- docs: vicc vs vpicc vs vpcd HOT 3
- The import_module is not compatible with recent Python 3.12 HOT 6
- Invoke vpcd on bluetooth connection osx HOT 4
- Keypad Reader (SPE) Support HOT 1
- Unable to configure PCSC - relay on mac HOT 4
- PCSC-relay on Mac HOT 3
- Request: Detailed guide to build pcsc-relay on windows
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vsmartcard.