Skip to content

Changes

Summary

  1. utils: Introduce BER-TLV parsers that return raw tag or even raw TLV (details)
  2. esim.bsp: Fix a bug in demac_only_one() (details)
Commit ee7be445285334ccce1734e003c3222662d922a0 by laforge
utils: Introduce BER-TLV parsers that return raw tag or even raw TLV

In the eSIM RSP univers there are some rather ugly layering violatoins
where ASN.1 cannot be parsed but we have to mess with raw TLVs and the
details of DER encoding.  Let's add two funtions that make it more
convenient to work with this: They return the raw tag as integer, or
even the entire encoded TLV rather than the value part only.

Change-Id: I1e68a4003b833e86e9282c77325afa86ce144b98
The file was modified pySim/utils.py
The file was modified pySim/esim/rsp.py
Commit fe28a1d87d52920d01168d961009201a2b4647d6 by laforge
esim.bsp: Fix a bug in demac_only_one()

When de-MAC-ing at the recipient side, we must increment the cipher(!)
block number even if no ciphering is done at all.

We did this correctly for MAC (sender) case, but not on the de-MAC
(receiver) case.

Change-Id: I97993f9e8357b36401d435aaa15558d1c7e411eb
The file was modified pySim/esim/bsp.py