Change in pysim[master]: commands: better exception string for authentication failures
gerrit-no-reply at lists.osmocom.org
Mon Mar 22 21:27:49 UTC 2021
dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/23423 )
Change subject: commands: better exception string for authentication failures
Patch Set 1:
> Patch Set 1:
> > Patch Set 1: Code-Review-1
> > IMHO this should not be done here; instead the respective card profile should register code for status word interpretation that does the SW -> String conversion. There should already be genric support for that in place.
> ok, the existing code only has wildcard matching mapping to statig strings. I suggest to extend that with an option to register a function for decoding.
> This could be done by using the existing status-word-dict that contains "sw: string" mappings, and you could register a function instead. The interpret_sw() could then check if the value in the dict is a str (behavior like now) or a function (call the function and use the return as string).
I have now analyzed the problem a bit. What we could do is to use rs.interpret_sw() from do_verify_adm() to convert the SW, but then still the translation would be wrong. The reason for this is that the 63cx SW has a different meaning when it is used when the VERIFY PIN command is used. See ETSI TS 102 221, Table 10.9.
To view, visit https://gerrit.osmocom.org/c/pysim/+/23423
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Comment-Date: Mon, 22 Mar 2021 21:27:49 +0000
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gerrit-log