mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-25 23:08:34 +03:00
Merge branch 'chrysn/for-29033' into chrysn/ota
Change-Id: Iebc7444fc32184d24c7bccc8ce694755cbbcc04b
This commit is contained in:
@@ -344,7 +344,9 @@ class OtaDialectSms(OtaDialect):
|
|||||||
if spi['ciphering']: # ciphering is requested
|
if spi['ciphering']: # ciphering is requested
|
||||||
# append padding bytes to end up with blocksize
|
# append padding bytes to end up with blocksize
|
||||||
len_cipher = 6 + len_sig + len(apdu)
|
len_cipher = 6 + len_sig + len(apdu)
|
||||||
apdu += otak.crypt._get_padding(len_cipher, otak.crypt.blocksize)
|
padding = otak.crypt._get_padding(len_cipher, otak.crypt.blocksize)
|
||||||
|
pad_cnt = len(padding)
|
||||||
|
apdu += padding
|
||||||
|
|
||||||
kic = {'key': otak.kic_idx, 'algo': otak.algo_crypt}
|
kic = {'key': otak.kic_idx, 'algo': otak.algo_crypt}
|
||||||
kid = {'key': otak.kid_idx, 'algo': otak.algo_auth}
|
kid = {'key': otak.kid_idx, 'algo': otak.algo_auth}
|
||||||
|
|||||||
@@ -41,8 +41,8 @@ class UserDataHeader:
|
|||||||
def __init__(self, ies=[]):
|
def __init__(self, ies=[]):
|
||||||
self.ies = ies
|
self.ies = ies
|
||||||
|
|
||||||
def __str__(self) -> str:
|
def __repr__(self) -> str:
|
||||||
return 'UDH(%s)' % self.ies
|
return 'UDH(%r)' % self.ies
|
||||||
|
|
||||||
def has_ie(self, iei:int) -> bool:
|
def has_ie(self, iei:int) -> bool:
|
||||||
for ie in self.ies:
|
for ie in self.ies:
|
||||||
|
|||||||
Reference in New Issue
Block a user