Commit Graph

41 Commits

Author SHA1 Message Date
Alexandre Paillier
d8321d422d Renamed EIP-712 UI function 2022-08-05 18:15:44 +02:00
Alexandre Paillier
ca37612f61 Fix io_exchange exception
Was trying to reply to EIP712 ARRAY size APDU twice
2022-08-05 18:15:43 +02:00
Alexandre Paillier
447e7b9277 Verbose EIP-712 setting now ignores filtering APDUs 2022-08-05 18:15:43 +02:00
Alexandre Paillier
b1f2e933c0 Added an EIP712 test key 2022-08-05 18:15:42 +02:00
Alexandre Paillier
b7a4c0d93b EIP-712 filtering UI adjustments; Removed half-blind special compilation flag 2022-08-05 18:15:41 +02:00
Alexandre Paillier
a24f621ce3 EIP712 filtering, added new APDUs 2022-08-05 18:15:41 +02:00
Alexandre Paillier
f480d5091e Now uses an eip712 context struct instead of having multiple global variables => reduced bss footprint 2022-08-05 18:15:39 +02:00
Alexandre Paillier
239da44d0e Added a new temporary EIP-712 half-bind mode 2022-08-05 17:52:48 +02:00
Alexandre Paillier
2fa6379470 Now only compiles full EIP-712 support for capable devices 2022-08-05 17:52:47 +02:00
Alexandre Paillier
c0eaf8d106 Proper cleanup after EIP712 message 2022-08-05 17:52:46 +02:00
Alexandre Paillier
9cd39e2c02 Now uses some of the old EIP712 code as common code between the two implementations + approve/reject button now works 2022-08-05 17:52:45 +02:00
Alexandre Paillier
9f29a7caa2 UI handling WIP 2022-08-05 17:52:44 +02:00
Alexandre Paillier
516682b206 Fix impl APDU wrongly returning 0x6a80 2022-08-05 17:52:42 +02:00
Alexandre Paillier
4442ba5716 Now responds to EIP712 APDUs 2022-08-05 17:52:41 +02:00
Alexandre Paillier
9f8b2da74c WIP integration in app 2022-08-05 17:52:41 +02:00
Alexandre Paillier
e070c379da Removed old code main function & apdu handling function 2022-08-05 17:52:40 +02:00
Alexandre Paillier
d333b3a433 Fixed compilation errors/warnings 2022-08-05 17:52:40 +02:00
Alexandre Paillier
6c14bfa476 Now wraps the printf calls in a macro. SDK-like 2022-08-05 17:52:39 +02:00
Alexandre Paillier
6d86a5de77 Global hash making 2022-08-05 17:52:38 +02:00
Alexandre Paillier
83dda443f4 Refactor type hash function to use less RAM 2022-08-05 17:52:37 +02:00
Alexandre Paillier
149e20cd11 Typehash refactoring 2022-08-05 17:52:36 +02:00
Alexandre Paillier
a3f5eee116 WIP field hashing support 2022-08-05 17:52:35 +02:00
Alexandre Paillier
45dfd5d6a6 Proper path implementation with array support 2022-08-05 17:52:34 +02:00
Alexandre Paillier
0e386a4204 Now initializes a path in memory 2022-08-05 17:52:34 +02:00
Alexandre Paillier
7e35b96ec0 WIP field hashing 2022-08-05 17:52:33 +02:00
Alexandre Paillier
54fe26a301 Extracted the context initialization from the main source file 2022-08-05 17:52:29 +02:00
Alexandre Paillier
5889da054e Extracted the encodeType and typeHash functions from the main file 2022-08-05 17:52:28 +02:00
Alexandre Paillier
e3dfd787b5 Memory allocation checking 2022-08-05 17:52:28 +02:00
Alexandre Paillier
16081c38a9 Added some memory related debug features 2022-08-05 17:52:28 +02:00
Alexandre Paillier
59490beff9 Small type-enforcing refactoring + now properly gets typestrings 2022-08-05 17:52:27 +02:00
Alexandre Paillier
e57bc93c69 Fix stack overflow with long APDUs 2022-08-05 17:52:27 +02:00
Alexandre Paillier
161919c012 Simpler computing the string's length in memory 2022-08-05 17:52:26 +02:00
Alexandre Paillier
420afdf958 Small function to make formatting into memory of uint easier 2022-08-05 17:52:26 +02:00
Alexandre Paillier
e3a8e4ccd2 Big Refactoring
- moved some things in header files
- now uses memory allocation functions with automatic checks, small abstraction layer
2022-08-05 17:52:26 +02:00
Alexandre Paillier
5438b39eb2 Fixes the index overflow, since header + data could be longer than 0xFF 2022-08-05 17:52:25 +02:00
Alexandre Paillier
63f454b29a Fixed ram usage message 2022-08-05 17:52:24 +02:00
Alexandre Paillier
024691eb64 Fix warning in release mode 2022-08-05 17:52:24 +02:00
Alexandre Paillier
545bc439fe Better implementation of enum(s)->typename memory structure 2022-08-05 17:52:24 +02:00
Alexandre Paillier
c3dc0c18ff Refactoring; added some utility functions to navigate the type definitions 2022-08-05 17:52:23 +02:00
Alexandre Paillier
3b6c32d707 Updated C code with new array handling 2022-08-05 17:52:23 +02:00
Alexandre Paillier
1bc8675473 Initial version 2022-08-05 17:52:22 +02:00