jacobschaer / python-doipclient

Pure Python ISO 13400 Client
MIT License
158 stars 51 forks source link

Fix "DeniedRequiresTLS" value for activation request #53

Closed clementramirez closed 1 month ago

clementramirez commented 1 month ago

Hi, The value corresponding to a Negative Response "Requires TLS" after sending a Routing Activation Request is invalid.

Currently this value is set to "0x06", but according to the ISO-13400 standard, the "0x06" value corresponds to an unknown activation type.

Referring to the standard, we can state that the Negative Response Code "Requires TLS" should be set to "0x07" :

After reception of a routing activation request message with a routing activation type, which requires the secure TLS connection to the DoIP entity then each DoIP entity supporting the secure TCP communication shall send the routing activation response message with the response code set to 0x07.

This patch applies the correct correction to the "DeniedRequiresTLS" value.

Sincerely,

Clément Ramirez

jacobschaer commented 1 month ago

Can you also add the correct 0x6 and update the comment to say "table 49" instead of 48? I'm not sure where the mistake came in. The AutoSAR spec seems to have only referenced a few of them so I imagine copy/paste error from one of the other sources.

6 should be DeniedUnsupportedActivationType https://github.com/wireshark/wireshark/blob/e9c737abbe5b3cdb0245333750a05df3cad26975/epan/dissectors/packet-doip.c#L244

clementramirez commented 1 month ago

Thanks for your fast reply,

The DeniedUnsupportedActivationType has been added to the ResponseCode Class and the comment for the table number is now set to 49.