This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/26040 ) Change subject: cards: add method to modify APDU parameters (cla, sel_ctrl) ...................................................................... cards: add method to modify APDU parameters (cla, sel_ctrl) There are situations where it is necessary to modify the class byte and the selection control bytes of a card at runtime. This should not be done by accessing the properties of the _scc object directly. The modification of those properties should be done via a set method instead. Change-Id: Ifd8aa2660e44a18d28945d070419612eff443e78 --- M pySim/cards.py 1 file changed, 9 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/pySim/cards.py b/pySim/cards.py index 1a86b14..4511271 100644 --- a/pySim/cards.py +++ b/pySim/cards.py @@ -302,6 +302,15 @@ len = self._scc.record_size(ef) self._scc.update_record(ef, rec_no, "ff" * len, force_len=False, verify=True) + def set_apdu_parameter(self, cla, sel_ctrl): + """Set apdu parameters (class byte and selection control bytes)""" + self._scc.cla_byte = cla + self._scc.sel_ctrl = sel_ctrl + + def get_apdu_parameter(self): + """Get apdu parameters (class byte and selection control bytes)""" + return (self._scc.cla_byte, self._scc.sel_ctrl) + class UsimCard(SimCard): name = 'USIM' -- To view, visit https://gerrit.osmocom.org/c/pysim/+/26040 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ifd8aa2660e44a18d28945d070419612eff443e78 Gerrit-Change-Number: 26040 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211031/18160d9e/attachment.htm>