Changeset 98


Ignore:
Timestamp:
06/11/09 00:18:25 (11 years ago)
Author:
rorothetroll
Message:

reader-viaccess.c : smurzch and I got a PPV/VOD EMM from a contact which allowed us to modify the EMM processing

to allow it to work. This should not change the regular behavior of EMM and allow these PPV/VOD EMM
to work. The early test showed that this is working and we're expecting a confirmation in the next few days.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/reader-viaccess.c

    r96 r98  
    438438  }
    439439
    440   if (!nano9EData) {
    441     cs_dump(ep->emm, ep->l, "can't find 0x9e in emm, confidential used?");
    442     return 0; // error
    443   }
    444 
    445440  if (!nanoF0Data) {
    446441    cs_dump(ep->emm, ep->l, "can't find 0xf0 in emm...");
     
    448443  }
    449444
    450   if (!nano91Data) {
    451     // set adf
    452     insf0[3] = keynr;  // key
    453     write_cmd(insf0, nano9EData);
    454     if( cta_res[cta_lr-2]!=0x90 || cta_res[cta_lr-1]!=0x00 ) {
    455       cs_dump(insf0, 5, "set adf cmd:");
    456       cs_dump(nano9EData, 0x22, "set adf data:");
    457       cs_log("update error: %02X %02X", cta_res[cta_lr-2], cta_res[cta_lr-1]);
    458       return 0;
    459     }
    460   } else {
    461     // set adf crypte
    462     insf4[3] = keynr;  // key
    463     insf4[4] = nano91Data[1] + 2 + nano9EData[1] + 2;
    464     memcpy (insData, nano91Data, nano91Data[1] + 2);
    465     memcpy (insData + nano91Data[1] + 2, nano9EData, nano9EData[1] + 2);
    466     write_cmd(insf4, insData);
    467     if(( cta_res[cta_lr-2]!=0x90 && cta_res[cta_lr-2]!=0x91) || cta_res[cta_lr-1]!=0x00 ) {
    468       cs_dump(insf4, 5, "set adf encrypted cmd:");
    469       cs_dump(insData, insf4[4], "set adf encrypted data:");
    470       cs_log("update error: %02X %02X", cta_res[cta_lr-2], cta_res[cta_lr-1]);
    471       return 0;
     445  if (nano9EData) {
     446    if (!nano91Data) {
     447      // set adf
     448      insf0[3] = keynr;  // key
     449      write_cmd(insf0, nano9EData);
     450      if( cta_res[cta_lr-2]!=0x90 || cta_res[cta_lr-1]!=0x00 ) {
     451        cs_dump(insf0, 5, "set adf cmd:");
     452        cs_dump(nano9EData, 0x22, "set adf data:");
     453        cs_log("update error: %02X %02X", cta_res[cta_lr-2], cta_res[cta_lr-1]);
     454        return 0;
     455      }
     456    } else {
     457      // set adf crypte
     458      insf4[3] = keynr;  // key
     459      insf4[4] = nano91Data[1] + 2 + nano9EData[1] + 2;
     460      memcpy (insData, nano91Data, nano91Data[1] + 2);
     461      memcpy (insData + nano91Data[1] + 2, nano9EData, nano9EData[1] + 2);
     462      write_cmd(insf4, insData);
     463      if(( cta_res[cta_lr-2]!=0x90 && cta_res[cta_lr-2]!=0x91) || cta_res[cta_lr-1]!=0x00 ) {
     464        cs_dump(insf4, 5, "set adf encrypted cmd:");
     465        cs_dump(insData, insf4[4], "set adf encrypted data:");
     466        cs_log("update error: %02X %02X", cta_res[cta_lr-2], cta_res[cta_lr-1]);
     467        return 0;
     468      }
    472469    }
    473470  }
     
    561558  show_cls=reader[ridx].show_cls;
    562559  memset(&last_geo, 0, sizeof(last_geo));
    563   cs_log("card detected");
    564560
    565561  // set pin
Note: See TracChangeset for help on using the changeset viewer.