mirror of https://gerrit.osmocom.org/pysim
Merge branch 'chrysn/for-29033' into chrysn/ota
Change-Id: Iebc7444fc32184d24c7bccc8ce694755cbbcc04b
This commit is contained in:
commit
28af6966aa
|
@ -344,7 +344,9 @@ class OtaDialectSms(OtaDialect):
|
|||
if spi['ciphering']: # ciphering is requested
|
||||
# append padding bytes to end up with blocksize
|
||||
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}
|
||||
kid = {'key': otak.kid_idx, 'algo': otak.algo_auth}
|
||||
|
|
|
@ -41,8 +41,8 @@ class UserDataHeader:
|
|||
def __init__(self, ies=[]):
|
||||
self.ies = ies
|
||||
|
||||
def __str__(self) -> str:
|
||||
return 'UDH(%s)' % self.ies
|
||||
def __repr__(self) -> str:
|
||||
return 'UDH(%r)' % self.ies
|
||||
|
||||
def has_ie(self, iei:int) -> bool:
|
||||
for ie in self.ies:
|
||||
|
|
Loading…
Reference in New Issue