forked from public/pysim
smpp_ota_apdu2: Re-try decoding PoR without crypto if it fails with
If something prevents the response from being ciphered, we need to fall back to plaintext. Change-Id: I748c5690029c28a0fcf39a2d99bc6c03fcb33dbd
This commit is contained in:
@@ -19,7 +19,13 @@ class Foo:
|
|||||||
def smpp_rx_handler(self, pdu):
|
def smpp_rx_handler(self, pdu):
|
||||||
sys.stdout.write('delivered {}\n'.format(pdu.receipted_message_id))
|
sys.stdout.write('delivered {}\n'.format(pdu.receipted_message_id))
|
||||||
if pdu.short_message:
|
if pdu.short_message:
|
||||||
dec = self.ota_dialect.decode_resp(self.ota_keyset, self.spi, pdu.short_message)
|
try:
|
||||||
|
dec = self.ota_dialect.decode_resp(self.ota_keyset, self.spi, pdu.short_message)
|
||||||
|
except ValueError:
|
||||||
|
spi = self.spi.copy()
|
||||||
|
spi['por_shall_be_ciphered'] = False
|
||||||
|
spi['por_rc_cc_ds'] = 'no_rc_cc_ds'
|
||||||
|
dec = self.ota_dialect.decode_resp(self.ota_keyset, spi, pdu.short_message)
|
||||||
pp(dec)
|
pp(dec)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user