1
0
Fork 0
forked from fun/fun

Hmmm... (0.27.2)

This commit is contained in:
Johannes Findeisen 2025-10-18 06:46:00 +02:00
commit 4056ef2ce0
4 changed files with 96 additions and 4 deletions

View file

@ -93,11 +93,22 @@ class PCSC()
if (readers == nil)
print([])
_ = pcsc_release(ctx)
return 0
// return a default result map instead of 0, so callers can index fields safely
m = {}
m["data"] = []
m["sw1"] = -1
m["sw2"] = -1
m["code"] = -2
return m
if (len(readers) == 0)
print([])
_ = pcsc_release(ctx)
return 0
m = {}
m["data"] = []
m["sw1"] = -1
m["sw2"] = -1
m["code"] = -2
return m
// Actually selecting the second reader hardcode. This class is not in a very early stage of development.
handle = pcsc_connect(ctx, readers[1])
apdu = this.hex_to_bytes(hex_apdu)