Commit graph

544 commits

Author SHA1 Message Date
Pol Henarejos
7249fb129b Using custom mbedtls configuration file.
We disable lots of unwanted algorithms and suites and we only keep those are used.
2022-06-01 12:57:24 +02:00
Pol Henarejos
199095c204 Moving some ASN1 procedures to a separate file. 2022-06-01 09:45:27 +02:00
Pol Henarejos
67efd73a96
Not used anymore.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-05-31 20:38:43 +02:00
Pol Henarejos
fa4ecf658f
Implementing own functions for cvc manipulation.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-05-31 18:51:43 +02:00
Pol Henarejos
8d409023bf
Fix Ne value for legacy apdu. 2022-05-31 00:04:46 +02:00
Pol Henarejos
950e276ee8
Adding asn1_find_tag() for searching for a tag in a asn1 string. 2022-05-30 23:31:17 +02:00
Pol Henarejos
ef52ae37d3
Reorganizing usb layer. 2022-05-30 12:20:42 +02:00
Pol Henarejos
58e9e67ee5
Fix with data and extended length. 2022-05-30 00:51:36 +02:00
Pol Henarejos
acde4c54d5
Fix timeout. 2022-05-30 00:14:44 +02:00
Pol Henarejos
46603fa390
If the he packet is multiple 64 bytes, we trunk it.
It is a weird bug that affects PHY of rp2040.
2022-05-29 03:34:22 +02:00
Pol Henarejos
8bb47e7979
Compilation fixes in debug mode 2022-05-29 03:33:40 +02:00
Pol Henarejos
e0bff38384
Moving again to TinyUSB 2022-05-29 01:52:44 +02:00
Pol Henarejos
152a2fa031
Fix warnings 2022-05-27 20:58:28 +02:00
Pol Henarejos
79878a76c2 More fixes 2022-05-27 09:04:08 +02:00
Pol Henarejos
da871e695e
More and more fixes. 2022-05-27 00:36:44 +02:00
Pol Henarejos
d4b0978d50 More fixes 2022-05-26 14:15:16 +02:00
Pol Henarejos
77ce276b59
First attempt to run away from tinyUSB to our code.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-05-26 00:03:38 +02:00
Pol Henarejos
56453b60d6
Added fmd flag to wrap FCP to include later the FMD.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-05-24 23:30:01 +02:00
Pol Henarejos
bd178c86e4
Added check.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-05-24 20:52:31 +02:00
Pol Henarejos
cd6a2dd4b5
Fix for new meta data.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-05-24 20:52:01 +02:00
Pol Henarejos
24502966ce
Fix finding meta_data.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-05-24 20:41:04 +02:00
Pol Henarejos
3431293d43
Optimized special case when new meta data length is the same.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-05-24 15:54:07 +02:00
Pol Henarejos
21f70601b4
Avoid unnecessary memcpy
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-05-24 15:20:59 +02:00
Pol Henarejos
c4e781103f
Fix with write offsets.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-05-24 14:43:08 +02:00
Pol Henarejos
6c90ce3361
Add meta functions for manipulating meta data.
Added meta_add(), meta_delete() and meta_find().
It conveys this meta data throught tag A5 of FCP.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-05-24 14:42:54 +02:00
Pol Henarejos
1a58422cd8
flash_write_data_to_file() now accepts offset argument.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-05-24 14:28:30 +02:00
Pol Henarejos
5a30c7cbdc
format_tlv_len() accepts NULL argument.
In that case, it returns the length of the length in bytes.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-05-24 14:27:49 +02:00
Pol Henarejos
5e2fc081f1
Added high level functions for reading file and returning file size.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-05-24 00:18:43 +02:00
Pol Henarejos
d19429cb84
Fix handling dynamic files.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-05-23 19:56:26 +02:00
Pol Henarejos
7ed4cb912e
These fids are propertary.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-05-23 14:43:09 +02:00
Pol Henarejos
efb6c8d8cd
Adding Life-cycle status to FCP.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-05-15 18:49:30 +02:00
Pol Henarejos
f7d30d7f4d
Adding FCP tag template. Some apps could require FMD tag.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-05-15 18:37:57 +02:00
Pol Henarejos
de39035d9f
FCI name (tag 84) has 16 bytes max length.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-05-15 18:34:00 +02:00
Pol Henarejos
ae935d19f8
Fix sending FCI name tag.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-05-15 18:33:14 +02:00
Pol Henarejos
de04dd6121
Should be with this values.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-05-05 22:27:01 +02:00
Pol Henarejos
9c5250f6ca
Adding timeout for press button of 15 secs.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-05-05 20:03:17 +02:00
Pol Henarejos
cddc3b2dec
Adding name to FCP
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-04-20 14:13:43 +02:00
Pol Henarejos
16f23dfa6c
Upgrading to v1.1. 2022-04-19 19:22:22 +02:00
Pol Henarejos
5e51c9a072
Renaming version file. 2022-04-19 19:13:58 +02:00
Pol Henarejos
7d4f9e4f1f
Adding EAC and some crypto functions.
Adding MBEDTLS submodule to core.
2022-04-19 19:09:38 +02:00
Pol Henarejos
39efd9b170
Setting version of CCID core module. 2022-04-19 18:55:43 +02:00
Pol Henarejos
cffee4264a
Defining ATR not in the core. 2022-04-19 18:37:42 +02:00
Pol Henarejos
1f33f1417c
Adding first release of Pico CCID. It should be the core for different types of smart cards. 2022-04-19 13:40:45 +02:00
Pol Henarejos
62e1c64584
Initial commit 2022-04-19 12:58:22 +02:00