Open kwoyhope opened 9 months ago
Unfortunately, I ran into the same eMAID field coding error. For the CertificateInstallationReq/Res in iso15118-2, I use Trilog ComboCS to test testcase. ComboCS verifies signature after received CertificateInstallationRes, and then an error has occurred to the eMAID field: the eMAID's digest in CertificateInstallationRes and eMAID's digest calculated by ComboCS are inconsistent. It is clear that the exi encoding of the eMAID field causes the digest to differ.
This is the test data: {"eMAID": {"Id": "id4", "value": "FRTRIC00618333C"}}
Using cbexigen encoding results:
message= b'{"eMAID": {"Id": "id4", "value": "FRTRIC00618333C"}}' namespace= b'urn:iso:15118:2:2013:MsgDef' command = eMAID encode ret1= 0 stream.byte_pos =23 dataReq (24 bytes): +------------------------------------------------------------------------------+ | Offset : 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF | +------------------------------------------------------------------------------+ | 00000000: 80 EC 02 B4 B2 1A 04 51 94 95 14 92 50 CC 0C 0D .......Q....P... | | 00000010: 8C 4E 0C CC CC D0 DE 80 .N...... | +------------------------------------------------------------------------------+
The result encoded with ExiCodec.jar:
=============== exi_codec.encode ================ msgName= eMAID namespace= urn:iso:15118:2:2013:MsgDef json= {"eMAID": {"Id": "id4", "value": "FRTRIC00618333C"}} encoded_message.length = 27 [ 0x80, 0xEC, 0x02, 0x02, 0xB4, 0xB2, 0x1A, 0x40, 0x04, 0x51, 0x94, 0x95, 0x14, 0x92, 0x50, 0xCC, 0x0C, 0x0D, 0x8C, 0x4E, 0x0C, 0xCC, 0xCC, 0xD0, 0xFD, 0x3D, 0x00, ]
These errors are in the same position as the above problem, please research to solve!
I can see your comment about 'eMAID'(ISO 15118-2) in config.py, but it seems that there is an unresolved(remaining) issue.
As you already know, EMAIDType != eMAIDType. eMAIDType : "Annex H.1 e-Mobility Account Identifier (EMAID)", for PaymentDetailsReq, CertificateUpdateReq