ci init changed

Origin commit data
------------------
Branch: master
Commit: d057932aed
Author: BPanther <bpanther_ts@hotmail.com>
Date: 2025-07-19 (Sat, 19 Jul 2025)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
BPanther
2025-07-19 09:44:52 +02:00
committed by vanhofen
parent e5d4d93ddd
commit 9edba0181b
4 changed files with 83 additions and 21 deletions

View File

@@ -1680,3 +1680,8 @@ void cCA::SetCIRelevantPidsRouting(int RPR, int slot)
}
}
#endif
void cCA::SetCIOperator(int ciop, int slot)
{
op[slot] = ciop;
}

View File

@@ -346,6 +346,9 @@ class cCA
/// relevant pids routing
void SetCIRelevantPidsRouting(int RPR, int slot = 0);
#endif
/// ci operator mode
int op[4];
void SetCIOperator(int ciop, int slot = 0);
/// Start the CA module
/// sh4 unused

View File

@@ -73,33 +73,85 @@ int eDVBCIResourceManagerSession::doAction()
{
const unsigned char tag[3] = {0x9F, 0x80, 0x11};
if (cCA::GetInstance()->CheckCerts())
{
if (cCA::GetInstance()->op[slot->slot])
{
const unsigned char data[][4] =
{
{0x00, 0x01, 0x00, 0x41}, // resource
{0x00, 0x02, 0x00, 0x41}, // application V1
{0x00, 0x02, 0x00, 0x43}, // application V3
{0x00, 0x03, 0x00, 0x41}, // conditional access
{0x00, 0x20, 0x00, 0x41}, // host control (dummy)
{0x00, 0x01, 0x00, 0x41}, // res mgr 1
// {0x00, 0x01, 0x00, 0x42}, // res mgr 2
{0x00, 0x02, 0x00, 0x41}, // app mgr 1
{0x00, 0x02, 0x00, 0x42}, // app mgr 2
{0x00, 0x02, 0x00, 0x43}, // app mgr 3
{0x00, 0x02, 0x00, 0x45}, // app mgr 5
{0x00, 0x03, 0x00, 0x41}, // ca mgr
{0x00, 0x20, 0x00, 0x41}, // host ctrl 1
{0x00, 0x20, 0x00, 0x42}, // host ctrl 2
{0x00, 0x20, 0x00, 0x43}, // host ctrl 3
{0x00, 0x24, 0x00, 0x41}, // datetime
{0x00, 0x40, 0x00, 0x41}, // mmi
{0x00, 0x24, 0x00, 0x41}, // date-time
{0x00, 0x8c, 0x10, 0x01}, // content control
{0x00, 0x8e, 0x10, 0x01} // cam upgrade (dummy)
// {0x00, 0x10, 0x00, 0x41} // auth.
// {0x00, 0x10, 0x00, 0x41}, // auth.
{0x00, 0x41, 0x00, 0x41}, // app mmi 1
{0x00, 0x41, 0x00, 0x42}, // app mmi 2
{0x00, 0x8c, 0x10, 0x01}, // content ctrl 1
{0x00, 0x8c, 0x10, 0x02}, // content ctrl 2
{0x00, 0x8c, 0x10, 0x04}, // content ctrl 4
{0x00, 0x8d, 0x10, 0x01}, // Host lang ctrl
{0x00, 0x8e, 0x10, 0x01}, // Cam upgrade
{0x00, 0x8f, 0x10, 0x01}, // operator profile 1
{0x00, 0x8f, 0x10, 0x02} // operator profile 2
// {0x00, 0x97, 0x10, 0x01},
// {0x00, 0x60, 0x60, 0x03},
// {0x00, 0x04, 0x10, 0x01}
};
// printf("<<<<< CI Modul Slot %i - operator profile >>>>>\n", slot->slot);
sendAPDU(tag, data, sizeof(data));
}
else
{
const unsigned char data[][4] =
{
{0x00, 0x01, 0x00, 0x41}, // resource
{0x00, 0x02, 0x00, 0x41}, // application V1
{0x00, 0x02, 0x00, 0x43}, // application V3
{0x00, 0x03, 0x00, 0x41}, // conditional access
// {0x00, 0x20, 0x00, 0x41}, // host control
{0x00, 0x01, 0x00, 0x41}, // res mgr 1
// {0x00, 0x01, 0x00, 0x42}, // res mgr 2
{0x00, 0x02, 0x00, 0x41}, // app mgr 1
{0x00, 0x02, 0x00, 0x42}, // app mgr 2
{0x00, 0x02, 0x00, 0x43}, // app mgr 3
{0x00, 0x02, 0x00, 0x45}, // app mgr 5
{0x00, 0x03, 0x00, 0x41}, // ca mgr
{0x00, 0x20, 0x00, 0x41}, // host ctrl 1
{0x00, 0x20, 0x00, 0x42}, // host ctrl 2
{0x00, 0x20, 0x00, 0x43}, // host ctrl 3
{0x00, 0x24, 0x00, 0x41}, // datetime
{0x00, 0x40, 0x00, 0x41}, // mmi
{0x00, 0x24, 0x00, 0x41} // date-time
// {0x00, 0x10, 0x00, 0x41}, // auth.
{0x00, 0x41, 0x00, 0x41}, // app mmi 1
{0x00, 0x41, 0x00, 0x42}, // app mmi 2
{0x00, 0x8c, 0x10, 0x01}, // content ctrl 1
{0x00, 0x8c, 0x10, 0x02}, // content ctrl 2
{0x00, 0x8c, 0x10, 0x04}, // content ctrl 4
{0x00, 0x8d, 0x10, 0x01}, // Host lang ctrl
{0x00, 0x8e, 0x10, 0x01} // Cam upgrade
// {0x00, 0x8f, 0x10, 0x01}, // operator profile 1
// {0x00, 0x8f, 0x10, 0x02}, // operator profile 2
// {0x00, 0x97, 0x10, 0x01},
// {0x00, 0x60, 0x60, 0x03},
// {0x00, 0x04, 0x10, 0x01}
};
// printf("<<<<< CI Modul Slot %i - NO operator profile >>>>>\n", slot->slot);
sendAPDU(tag, data, sizeof(data));
}
}
else
{
const unsigned char data[][4] =
{
{0x00, 0x01, 0x00, 0x41}, // res mgr 1
{0x00, 0x02, 0x00, 0x41}, // app mgr 1
{0x00, 0x02, 0x00, 0x43}, // app mgr 3
{0x00, 0x03, 0x00, 0x41}, // ca mgr
// {0x00, 0x20, 0x00, 0x41}, // host ctrl 1
{0x00, 0x24, 0x00, 0x41}, // datetime
{0x00, 0x40, 0x00, 0x41} // mmi
// {0x00, 0x10, 0x00, 0x41} // auth.
};
sendAPDU(tag, data, sizeof(data));

View File

@@ -191,7 +191,9 @@ eDVBCISession *eDVBCISession::createSession(eDVBCISlot *slot, const unsigned cha
printf("[CI SESS] RESOURCE MANAGER\n");
break;
case 0x00020041:
case 0x00020042:
case 0x00020043:
case 0x00020045:
sessions[session_nb - 1] = new eDVBCIApplicationManagerSession(slot);
printf("[CI SESS] APPLICATION MANAGER\n");
break;