From: leslie Date: Sat, 17 Mar 2012 16:32:53 +0000 (+0100) Subject: cardclient: handle Seca global EMM X-Git-Tag: upstream/620~16 X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=1cd961e28c5ba981a00006b7d4e800e3d2bd4a67;p=sasc-ng.git cardclient: handle Seca global EMM --- diff --git a/parse.c b/parse.c index f552028..16e1862 100644 --- a/parse.c +++ b/parse.c @@ -261,8 +261,8 @@ cCardSeca::cCardSeca(const unsigned char *u) bool cCardSeca::MatchEMM(const unsigned char *data) { - return TID(data)==0x82 && - !memcmp(UA(data),ua,sizeof(ua)); + return TID(data)==0x83 || + (TID(data)==0x82 && !memcmp(UA(data),ua,sizeof(ua))); } // -- cParseSeca --------------------------------------------------------------- diff --git a/system.c b/system.c index 3e96c9a..0bd9b73 100644 --- a/system.c +++ b/system.c @@ -174,9 +174,9 @@ void cSystem::ParseCAT(cPids *pids, const unsigned char *buffer, int source, int int pid=WORD(buffer,4,0x1FFF); if(overrides.AddEmmPids(caid,source,transponder,pids,pid)) return; switch(caid>>8) { - case 0x01: // Seca style (82/84) + case 0x01: // Seca style (82/83/84) if(buffer[1]>4) { - pids->AddPid(pid,0x82,0xFF); // Unique updates + pids->AddPid(pid,0x82,0xFE); // Unique/global updates for(int i=7, nn=buffer[6] ; nn ; nn--,i+=4) pids->AddPid(WORD(buffer,i,0x1FFF),0x84,0xFF); // Shared updates } diff --git a/systems/sc-seca/sc-seca.c b/systems/sc-seca/sc-seca.c index 2766a37..49b7537 100644 --- a/systems/sc-seca/sc-seca.c +++ b/systems/sc-seca/sc-seca.c @@ -319,6 +319,7 @@ bool cSmartCardSeca::Update(int pid, int caid, const unsigned char *data) { static unsigned char ins40[] = { 0xC1,0x40,0x00,0x00,0x00 }; + if(data[0]==0x83) return false; // don't know how to handle if(blocker==0 || (data[0]==0x82 && blocker==2) || (data[0]==0x84 && blocker==1)) { cProviderScSeca *p=(cProviderScSeca *)FindProv(data); if(p && MatchEMM(data)) {