From 7fa5cf7e98be283a2a33c69c80f740a548f059b4 Mon Sep 17 00:00:00 2001 From: leslie Date: Wed, 5 Aug 2009 07:28:40 +0800 Subject: [PATCH] sc-seca: update ECM card handling (from oscam R127) --- po/de_DE.po | 5 +---- po/fi_FI.po | 5 +---- po/fr_FR.po | 5 +---- po/hu_HU.po | 5 +---- po/it_IT.po | 5 +---- po/nl_NL.po | 5 +---- po/pl_PL.po | 5 +---- po/ru_RU.po | 5 +---- po/sv_SE.po | 5 +---- systems/sc-seca/sc-seca.c | 24 +++++++++++------------- 10 files changed, 20 insertions(+), 49 deletions(-) diff --git a/po/de_DE.po b/po/de_DE.po index 85ce8e2..cebe951 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: VDR 1.5.9\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-27 03:33-0400\n" +"POT-Creation-Date: 2009-08-04 19:21-0400\n" "PO-Revision-Date: 2007-08-27 12:45+0200\n" "Last-Translator: somebody\n" "Language-Team: somebody\n" @@ -223,9 +223,6 @@ msgstr "alle blocken" msgid "SC-Seca: EMM updates" msgstr "SC-Seca: EMM updates" -msgid "SC-Seca: activate PPV" -msgstr "SC-Seca: PPV aktivieren" - msgid "SC-Viaccess: Parental lock" msgstr "SC-Viaccess: Altersbeschränkung" diff --git a/po/fi_FI.po b/po/fi_FI.po index 425d654..7c09d95 100644 --- a/po/fi_FI.po +++ b/po/fi_FI.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: VDR 1.5.9\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-27 03:33-0400\n" +"POT-Creation-Date: 2009-08-04 19:21-0400\n" "PO-Revision-Date: 2008-11-19 13:45+0200\n" "Last-Translator: somebody\n" "Language-Team: somebody\n" @@ -223,9 +223,6 @@ msgstr "est msgid "SC-Seca: EMM updates" msgstr "SC-Seca: EMM-päivitykset" -msgid "SC-Seca: activate PPV" -msgstr "SC-Seca: Aktivoi PPV" - msgid "SC-Viaccess: Parental lock" msgstr "" diff --git a/po/fr_FR.po b/po/fr_FR.po index 0874ed8..97877b8 100644 --- a/po/fr_FR.po +++ b/po/fr_FR.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: VDR 1.5.9\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-27 03:33-0400\n" +"POT-Creation-Date: 2009-08-04 19:21-0400\n" "PO-Revision-Date: 2007-08-27 12:45+0200\n" "Last-Translator: somebody\n" "Language-Team: somebody\n" @@ -223,9 +223,6 @@ msgstr "bloquer TOUS" msgid "SC-Seca: EMM updates" msgstr "SC-Seca: mise à jour EMM" -msgid "SC-Seca: activate PPV" -msgstr "SC-Seca: activer les PPV" - msgid "SC-Viaccess: Parental lock" msgstr "" diff --git a/po/hu_HU.po b/po/hu_HU.po index cf2fa62..eeb0fb4 100644 --- a/po/hu_HU.po +++ b/po/hu_HU.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: VDR 1.5.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-27 03:33-0400\n" +"POT-Creation-Date: 2009-08-04 19:21-0400\n" "PO-Revision-Date: 2009-05-17 11:09+0800\n" "Last-Translator: jv\n" "Language-Team: somebody\n" @@ -223,9 +223,6 @@ msgstr "tiltsd MINDET" msgid "SC-Seca: EMM updates" msgstr "SC-Seca: EMM frissítés" -msgid "SC-Seca: activate PPV" -msgstr "SC-Seca: aktiváld a PPV-t" - msgid "SC-Viaccess: Parental lock" msgstr "" diff --git a/po/it_IT.po b/po/it_IT.po index ce8f8c2..0a1f1bc 100644 --- a/po/it_IT.po +++ b/po/it_IT.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: VDR 1.5.9\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-27 03:33-0400\n" +"POT-Creation-Date: 2009-08-04 19:21-0400\n" "PO-Revision-Date: 2008-11-19 12:23+0200\n" "Last-Translator: somebody\n" "Language-Team: somebody\n" @@ -223,9 +223,6 @@ msgstr "blocca TUTTO" msgid "SC-Seca: EMM updates" msgstr "SC-Seca: aggiornamenti EMM" -msgid "SC-Seca: activate PPV" -msgstr "SC-Seca: attiva PPV" - msgid "SC-Viaccess: Parental lock" msgstr "" diff --git a/po/nl_NL.po b/po/nl_NL.po index a8773ca..52136e2 100644 --- a/po/nl_NL.po +++ b/po/nl_NL.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: VDR 1.5.9\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-27 03:33-0400\n" +"POT-Creation-Date: 2009-08-04 19:21-0400\n" "PO-Revision-Date: 2007-08-27 12:45+0200\n" "Last-Translator: somebody\n" "Language-Team: somebody\n" @@ -223,9 +223,6 @@ msgstr "ALLES blokkeren" msgid "SC-Seca: EMM updates" msgstr "SC-Seca: EMM updates" -msgid "SC-Seca: activate PPV" -msgstr "SC-Seca: activeer PPV" - msgid "SC-Viaccess: Parental lock" msgstr "" diff --git a/po/pl_PL.po b/po/pl_PL.po index 5847d60..1253e70 100644 --- a/po/pl_PL.po +++ b/po/pl_PL.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: VDR 1.5.9\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-27 03:33-0400\n" +"POT-Creation-Date: 2009-08-04 19:21-0400\n" "PO-Revision-Date: 2007-08-27 12:45+0200\n" "Last-Translator: somebody\n" "Language-Team: somebody\n" @@ -223,9 +223,6 @@ msgstr "blokuj wszystkie" msgid "SC-Seca: EMM updates" msgstr "SC-Seca: aktualizacje EMM" -msgid "SC-Seca: activate PPV" -msgstr "SC-Seca: aktywuj PPV" - msgid "SC-Viaccess: Parental lock" msgstr "" diff --git a/po/ru_RU.po b/po/ru_RU.po index bebdd3a..991300c 100644 --- a/po/ru_RU.po +++ b/po/ru_RU.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: VDR 1.5.9\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-27 03:33-0400\n" +"POT-Creation-Date: 2009-08-04 19:21-0400\n" "PO-Revision-Date: 2009-05-14 19:33+0100\n" "Last-Translator: somebody\n" "Language-Team: ru\n" @@ -224,9 +224,6 @@ msgstr " msgid "SC-Seca: EMM updates" msgstr "SC-Seca: ÞÑÝÞÒÛÕÝØï EMM" -msgid "SC-Seca: activate PPV" -msgstr "SC-Seca: ÐÚâØÒØàÞÒÐâì PPV" - msgid "SC-Viaccess: Parental lock" msgstr "" diff --git a/po/sv_SE.po b/po/sv_SE.po index 673b4b6..5722f6a 100644 --- a/po/sv_SE.po +++ b/po/sv_SE.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: VDR 1.5.9\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-27 03:33-0400\n" +"POT-Creation-Date: 2009-08-04 19:21-0400\n" "PO-Revision-Date: 2007-08-27 12:45+0200\n" "Last-Translator: somebody\n" "Language-Team: somebody\n" @@ -223,9 +223,6 @@ msgstr "" msgid "SC-Seca: EMM updates" msgstr "" -msgid "SC-Seca: activate PPV" -msgstr "" - msgid "SC-Viaccess: Parental lock" msgstr "" diff --git a/systems/sc-seca/sc-seca.c b/systems/sc-seca/sc-seca.c index d0ff742..2766a37 100644 --- a/systems/sc-seca/sc-seca.c +++ b/systems/sc-seca/sc-seca.c @@ -62,7 +62,6 @@ static const struct LogModule lm_sc = { ADD_MODULE(L_SC,lm_sc) static int blocker=0; -static int ppv=false; // -- cSystemScSeca --------------------------------------------------------------- @@ -99,11 +98,8 @@ static cSystemLinkScSeca staticInit; cSystemLinkScSeca::cSystemLinkScSeca(void) :cSystemLink(SYSTEM_NAME,SYSTEM_PRI) { - opts=new cOpts(SYSTEM_NAME,2); + opts=new cOpts(SYSTEM_NAME,1); opts->Add(new cOptSel("Blocker",trNOOP("SC-Seca: EMM updates"),&blocker,sizeof(block)/sizeof(char *),block)); - cOpt *opt=new cOptBool("Ppv",trNOOP("SC-Seca: activate PPV"),&ppv); - if(opt) opt->Persistant(false); - opts->Add(opt); Feature.NeedsSmartCard(); } @@ -293,24 +289,26 @@ bool cSmartCardSeca::Decode(const cEcmInfo *ecm, const unsigned char *data, unsi { static unsigned char ins3c[] = { 0xC1,0x3c,0x00,0x00,0x00 }; // coding cw static unsigned char ins3a[] = { 0xC1,0x3a,0x00,0x00,0x10 }; // decoding cw - static unsigned char ins30[] = { 0xC1,0x30,0x00,0x02,0x09 }; // view ppv (active bx record) + static unsigned char ins30[] = { 0xC1,0x30,0x00,0x02,0x09 }; static unsigned char ins30data[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF }; cProviderScSeca *p=(cProviderScSeca *)FindProv(data); if(p && ecm->Data()) { PRINTF(L_SC_PROC,"provider 0x%04x index %d '%.16s' (expires %s)",cParseSeca::ProvId(data),p->index,p->name,Date(p->date)); if(CheckAccess(ecm->Data(),p)) { - if(ppv) { - PRINTF(L_SC_PROC,"activating PPV"); - if(IsoWrite(ins30,ins30data)) Status(); - ppv=false; - } const unsigned char *payload; ins3c[2]=p->index | (cParseSeca::SysMode(data) & 0xF0); ins3c[3]=cParseSeca::KeyNr(data); ins3c[4]=cParseSeca::Payload(data,&payload); - if(IsoWrite(ins3c,payload) && Status() && - IsoRead(ins3a,cw) && Status()) return true; + if(IsoWrite(ins3c,payload)) { + bool r; + if(sb[0]==0x90 && sb[1]==0x1A) // need to use token + r=IsoWrite(ins30,ins30data) && Status() && IsoWrite(ins3c,payload) && Status(); + else + r=Status(); + if(r && IsoRead(ins3a,cw) && Status()) + return true; + } } else PRINTF(L_SC_ERROR,"update your subscription to view this channel"); } -- 2.39.5