Remove Remnants of ITPP; #331

Tweaks to Decrypted MBE Playback; #298 #329
This commit is contained in:
lwvmobile
2026-01-05 12:56:07 -05:00
parent a5e000a14c
commit 4924bd249a
3 changed files with 17 additions and 6 deletions

View File

@@ -1235,6 +1235,16 @@ void read_sdrtrunk_json_format (dsd_opts * opts, dsd_state * state)
state->synctype = -1;
state->lastsynctype = -1;
//reset encryption variables
state->payload_mi = 0;
state->payload_algid = 0;
state->payload_keyid = 0;
if (state->keyloader == 1)
{
state->R = 0;
state->aes_key_loaded[0] = 0;
}
//watchdog for event history
watchdog_event_history(opts, state, 0);
watchdog_event_current(opts, state, 0);
@@ -1397,7 +1407,12 @@ void read_sdrtrunk_json_format (dsd_opts * opts, dsd_state * state)
rc4_db = 256;
rc4_mod = 9;
if (alg_id == 0x21 && state->R != 0)
//since we can't keyring on a forced alg, we can perhaps look it up
//via the TO field for the TG value, as long as it isn't greated than 0x1FFFF (upper bound of the array)
if (state->keyloader == 1 && state->lasttg != 0 && state->lasttg < 0x1FFFF && state->rkey_array[state->lasttg] != 0)
state->R = state->rkey_array[state->lasttg];
if (alg_id == 0x21 && state->R != 0 && state->payload_mi != 0)
{
//test when we don't have an encryption_mi in the .mbe file for DMR