Jean-Michel Picod
45b710dc0a
changelog
2023-06-14 16:42:11 +02:00
Jean-Michel Picod
d9ed07c77c
Missed one line for LegicCash uid
2023-06-14 16:41:42 +02:00
Jean-Michel Picod
fdd85d7e1e
Fix LegicCash segment CRC computation
2023-06-14 16:41:42 +02:00
Jean-Michel Picod
5a2c6406d8
Allow current directory to import python libraries
...
also fixed a bunch of wrong comments.
2023-02-13 21:58:34 +01:00
Jean-Michel Picod
8be70ea560
Fix minor bugs in hf tesla info
2023-01-30 23:27:17 +01:00
Jean-Michel Picod
86d26f9464
Fix uninitialised stack-based buffers
2023-01-26 01:13:27 +01:00
Jean-Michel Picod
3a7af55724
Fix python initialization to have SWIG work
2023-01-16 19:57:42 +01:00
Jean-Michel Picod
16410b064d
Fix format string to please CodeQL
2023-01-06 22:06:07 +01:00
Jean-Michel Picod
a7980d8e8a
Use a typed constant and see if that makes CodeQL happy :)
2023-01-06 21:52:26 +01:00
Jean-Michel Picod
15b541c2ea
Add command piv authsign
2023-01-06 21:36:08 +01:00
Jean-Michel Picod
e5f6e34632
changelog
2023-01-06 21:25:48 +01:00
Jean-Michel Picod
efc685864a
Add PIV command to scan all data containers on a PIV card.
2023-01-06 21:23:22 +01:00
Jean-Michel Picod
e9d461947e
Add changelog and fix my github handle
2023-01-06 18:31:12 +01:00
Jean-Michel Picod
663fd4efc9
Remove unused error code.
...
Will be added back for the PIN check command
2023-01-06 18:28:53 +01:00
Jean-Michel Picod
6e084d82d5
First two PIV commands
2023-01-06 18:19:31 +01:00
Jean-Michel Picod
80a4698a7f
Initial rework on TLV to avoid mem leaks
2023-01-06 13:03:10 +01:00
Jean-Michel Picod
4375f5b91e
Avoid memory leaks with Python <3.10
2022-12-20 15:32:38 +01:00
Jean-Michel Picod
0083e0ae13
Fix embedded python not working with Proxspace.
2022-12-09 21:58:28 +01:00
Jean-Michel Picod
f32de52b46
Wait a bit longer for the smartcard.
...
For the max 256-byte frame, SIM wasn't ready early enough, corrupting
the reception buffer with 5 spurious bytes.
Empirically, 109 clock cycles is the minimum value that worked.
Adding 1 clock cycle as a safety buffer.
2022-12-09 13:32:17 +01:00
Jean-Michel Picod
b487961cbd
Moved to non-deprecated API to init Python intepreter
2022-12-06 18:07:10 +01:00
Jean-Michel Picod
5bd6379b5b
Move message to debug
2022-12-05 22:05:23 +01:00
Jean-Michel Picod
07a8f7a6de
Raise the buffer size even more.
...
I was too conservative as it requires 261 bytes. Let's put 270 for the
peace of mind.
2022-12-05 22:05:15 +01:00
Jean-Michel Picod
c23c2b2aef
Rollback the firmware part
2022-12-05 20:05:28 +01:00
Jean-Michel Picod
ba27eb03e0
Update CHANGELOG
2022-12-05 19:42:23 +01:00
Jean-Michel Picod
83e6b223c4
Adapt ARM code to comply with SIM module firmware 4.12
2022-12-05 19:35:11 +01:00
Jean-Michel Picod
89702a4e6e
Add SIM module firmware 4.12 from Sentinel
2022-12-05 19:33:41 +01:00
Jean-Michel Picod
c2aed7900c
Temporary fix buffer overflow until new SIM firmware is released
2022-12-05 16:53:59 +01:00
Jean-Michel Picod
b70320d47d
Fixing some ISO7816-4 logic.
...
- Fixing overflow in BigBuffer if requesting to much data
- Fixing integer wrapping with the SIM module by capping APDU data
length
- Fixing chaining logic which was loosing previously received data
2022-12-05 10:54:38 +01:00
Jean-Michel Picod
8da4da6aa5
Also update comment about total size for Mifare keys storage.
2022-11-24 09:40:34 +01:00
Jean-Michel Picod
5bf0200b02
Update CHANGELOG.md
2022-11-24 09:37:02 +01:00
Jean-Michel Picod
ba83c26c1e
Add one more sector for Mifare keys on SPI flash.
...
This is a breaking change and after firmware upgrade, dictionnaries
should be loaded into flash again to ensure they're valid.
2022-11-24 09:35:22 +01:00
Jean-Michel Picod
1adec4dfb2
Fix overflow in SPI memory when writing default key dictionnaries.
...
Boundaries were defined in the memory layout but weren't enforced
by the client, causing an overflow when trying to load a
dictionnary that was too big.
It's too hard to enforce it on the ARM side as the command is a
generic write.
Now that limits are defined, also outputs them as part of the
`hw status` command.
2022-11-24 03:16:58 +01:00
Jean-Michel Picod
32d47cb6a4
Fix prolematic return codes in mifare.
...
Parts of the code returned positive values for error codes, which
could result in the client exiting (return value 2).
2022-11-04 11:06:59 +01:00
Jean-Michel Picod
b768f8e1a3
Fix comment and unreachable boundary.
2022-10-31 20:28:35 +01:00
Jean-Michel Picod
cee55d43ee
Modified logic to also try key B on MF cards.
...
In configurations where keyA is unknown but ACLs are configured to allow
all blocks to be read by keyB the command `hf mf dump` was failing.
This commit attempts to fix this behavior by trying keyA first and
swapping for keyB if half of the allowed tries failed.
2022-10-31 20:13:09 +01:00