Change in pysim[master]: commands: better exception string for authentication failures

dexter 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-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Icf428831094f8c1045eefaa8cb2b92e6a36b0c13
Gerrit-Change-Number: 23423
Gerrit-PatchSet: 1
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
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210322/85d9855c/attachment.htm>


More information about the gerrit-log mailing list