Change in pysim[master]: pySim/commands: Add envelope() method for ENVELOPE command

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.org
Wed Jun 30 08:14:27 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/24463 )

Change subject: pySim/commands: Add envelope() method for ENVELOPE command
......................................................................

pySim/commands: Add envelope() method for ENVELOPE command

Change-Id: I2b5b6585ecbe00b54919b197428fe09a220757c6
---
M pySim/commands.py
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  dexter: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/pySim/commands.py b/pySim/commands.py
index 1fbea16..76b7cd5 100644
--- a/pySim/commands.py
+++ b/pySim/commands.py
@@ -425,3 +425,7 @@
 		data, sw = self._tp.send_apdu(self.cla_byte + '2800' + ('%02X' % chv_no) + '08' + fc)
 		self._chv_process_sw('enable', chv_no, pin_code, sw)
 		return (data, sw)
+
+	def envelope(self, payload:str):
+		"""Send one ENVELOPE command to the SIM"""
+		return self._tp.send_apdu_checksw('80c20000%02x%s' % (len(payload)//2, payload))

-- 
To view, visit https://gerrit.osmocom.org/c/pysim/+/24463
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I2b5b6585ecbe00b54919b197428fe09a220757c6
Gerrit-Change-Number: 24463
Gerrit-PatchSet: 7
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
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/20210630/fd290331/attachment.htm>


More information about the gerrit-log mailing list