Hoernchen has uploaded this change for review.

View Change

bsp: fix maxpayloadsize

Change-Id: I08f544877b79681ad1f758a1ca31c292eae9f868
---
M pySim/esim/bsp.py
1 file changed, 1 insertion(+), 1 deletion(-)

git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/82/40882/1
diff --git a/pySim/esim/bsp.py b/pySim/esim/bsp.py
index 70e4a1f..cd4114f 100644
--- a/pySim/esim/bsp.py
+++ b/pySim/esim/bsp.py
@@ -282,7 +282,7 @@
def mac_only_one(self, tag: int, plaintext: bytes) -> bytes:
"""MAC a single plaintext TLV. Returns the protected ciphertext."""
assert tag <= 255
- assert len(plaintext) < self.max_payload_size
+ assert len(plaintext) <= self.max_payload_size
maced = self.m_algo.auth(tag, plaintext)
# The data block counter for ICV calculation is incremented also for each segment with C-MAC only.
self.c_algo.block_nr += 1

To view, visit change 40882. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I08f544877b79681ad1f758a1ca31c292eae9f868
Gerrit-Change-Number: 40882
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen <ewild@sysmocom.de>