-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JTT-81 Feat: Check response code #289
Conversation
response_code = ( | ||
resp_status | ||
if resp_status | ||
in [ | ||
ResponseCode.OK, | ||
ResponseCode.FAILED, | ||
ResponseCode.FAILED_SEQUENCE_ERROR, | ||
ResponseCode.FAILED_SIGNATURE_ERROR, | ||
ResponseCode.FAILED_UNKNOWN_SESSION, | ||
ResponseCode.FAILED_CERTIFICATE_EXPIRED, | ||
ResponseCode.FAILED_CERTIFICATE_REVOKED, | ||
ResponseCode.FAILED_NO_CERTIFICATE_AVAILABLE, | ||
] | ||
else ResponseCode.FAILED | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could potentially change in an upcoming update to the spec based on the ticket here: https://iso15118.elaad.io/pt2/15118-2/user-group/-/issues/38
Also André has opened a ticket for a better response code when chain error occurs here: https://iso15118.elaad.io/pt2/15118-2/user-group/-/issues/41
This PR introduces a status code verification before sending the response, as the compatibility might be affected by the state being transmitted.
Note:
This limitation arises from the definition of the status response code and its alignment with Table 112 in iso15118-2, which constrains the response to match its corresponding state.