mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-17 02:48:34 +03:00
pySim.ota: Raise exception if encoded length would exceed 140 bytes
SMS cannot exceed 140 bytes, and TS 31.115 explicitly states that larger messages must use multi-part SMS, which we don't yet implement here. Change-Id: I8a1543838be2add1c3cfdf7155676cf2b9827e6e
This commit is contained in:
@@ -386,6 +386,9 @@ class OtaDialectSms(OtaDialect):
|
||||
|
||||
#print("envelope_data: %s" % b2h(envelope_data))
|
||||
|
||||
if len(envelope_data) > 140:
|
||||
raise ValueError('Cannot encode command in a single SMS; Fragmentation not implemented')
|
||||
|
||||
return envelope_data
|
||||
|
||||
def decode_cmd(self, otak: OtaKeyset, encoded: bytes) -> Tuple[bytes, dict, bytes]:
|
||||
|
||||
Reference in New Issue
Block a user