Changeset 4821
- Timestamp:
- 03/16/11 17:23:19 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/reader-viaccess.c
r4739 r4821 293 293 // 0b -> pre AES decrypt CW 294 294 int nanoD2 = 0; // 0x0b = 1 0x0d = 2 295 int skipECM01 = 1;296 295 297 296 memset(DE04, 0, sizeof(DE04)); //fix dorcel de04 bug … … 365 364 // as some card don't support this 366 365 if( reader->last_geo.number_ecm > 0 ) { 367 if (reader->last_geo.number_ecm ==curnumber_ecm && ( ecm88Data[nanoLen-1] != 0x01 || skipECM01 == 0)) { //ecm88Data[8] != 0x01 try skip ECM 01 first pass366 if (reader->last_geo.number_ecm == curnumber_ecm) { 368 367 keynr=ecm88Data[5]; 369 368 cs_debug_mask(D_READER, "keyToUse = %02x, ECM ending with %02x",ecm88Data[5], ecm88Data[nanoLen-1]); 370 } 371 else 372 { 369 } else { 373 370 cs_debug_mask(D_READER, "Skip ECM ending with = %02x for ecm number (%x)",ecm88Data[nanoLen-1], curnumber_ecm); 374 371 ecm88Data=nextEcm; … … 441 438 // use AES from list to decrypt CW 442 439 cs_debug_mask(D_READER, "Decoding CW : using AES key id %d for provider %06x",D2KeyID, (provid & 0xFFFFF0)); 443 rc=aes_decrypt_from_list(reader->aes_list,0x500, (uint32) (provid & 0xFFFFF0), D2KeyID, &ecm88DataCW[0], 16); 444 if( rc == 0 ) 440 if (aes_decrypt_from_list(reader->aes_list,0x500, (uint32) (provid & 0xFFFFF0), D2KeyID, &ecm88DataCW[0], 16) == 0) 445 441 snprintf( er->msglog, MSGLOGSIZE, "AES Decrypt : key id %d not found for CAID %04X , provider %06lx", D2KeyID, 0x500, (provid & 0xFFFFF0) ); 446 442 } … … 510 506 cs_debug_mask(D_READER, "[viaccess-reader] ECM: Unknown ECM type"); 511 507 snprintf( er->msglog, MSGLOGSIZE, "Unknown ECM type" ); 512 }513 514 //Try to parse again ECM without skiping ECM ending with 01515 if( !(ecm88Len && !rc) && skipECM01 == 1)516 {517 skipECM01 = 0;518 ecm88Data=er->ecm+4;519 ecm88Len=SCT_LEN(er->ecm)-4;520 nextEcm=ecm88Data;521 508 } 522 509 }
Note:
See TracChangeset
for help on using the changeset viewer.