Changeset 380
- Timestamp:
- 09/04/09 10:01:56 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/merlin/src/CAM/videoguard.c
r357 r380 17 17 AES_KEY dkey, ekey; 18 18 19 static void c AES_SetKey(const unsigned char *key)19 static void cam_videoguard_cAES_SetKey(const unsigned char *key) 20 20 { 21 21 AES_set_decrypt_key(key, 128, &dkey); … … 24 24 } 25 25 26 static int c AES_Encrypt(const unsigned char *data, int len, unsigned char *crypt)26 static int cam_videoguard_cAES_Encrypt(const unsigned char *data, int len, unsigned char *crypt) 27 27 { 28 28 if (aes_active) { … … 39 39 ////// ==================================================================================== 40 40 41 static inline void __xxor(unsigned char *data, int len, const unsigned char *v1, const unsigned char *v2)41 static inline void cam_videoguard_xxor(unsigned char *data, int len, const unsigned char *v1, const unsigned char *v2) 42 42 { 43 43 switch (len) { // looks ugly, but the compiler can optimize it very well ;) … … 57 57 } 58 58 59 #define xor16(v1,v2,d) __xxor((d),16,(v1),(v2))59 #define xor16(v1,v2,d) cam_videoguard_xxor((d),16,(v1),(v2)) 60 60 #define val_by2on3(x) ((0xaaab*(x))>>16) //fixed point *2/3 61 61 … … 63 63 unsigned char stateD3A[16]; 64 64 65 static void c CamCryptVG2_LongMult(unsigned short *pData, unsigned short *pLen, unsigned int mult, unsigned int carry);66 static void c CamCryptVG2_PartialMod(unsigned short val, unsigned int count, unsigned short *outkey, const unsigned short *inkey);67 static void c CamCryptVG2_RotateRightAndHash(unsigned char *p);68 static void c CamCryptVG2_Reorder16A(unsigned char *dest, const unsigned char *src);69 static void c CamCryptVG2_ReorderAndEncrypt(unsigned char *p);70 static void c CamCryptVG2_Process_D0(const unsigned char *ins, unsigned char *data, const unsigned char *status);71 static void c CamCryptVG2_Process_D1(const unsigned char *ins, unsigned char *data, const unsigned char *status);72 static void c CamCryptVG2_Decrypt_D3(unsigned char *ins, unsigned char *data, const unsigned char *status);73 static void c CamCryptVG2_PostProcess_Decrypt(unsigned char *buff, int len, unsigned char *cw1, unsigned char *cw2);74 static void c CamCryptVG2_SetSeed(const unsigned char *Key1, const unsigned char *Key2);75 static void c CamCryptVG2_GetCamKey(unsigned char *buff);76 77 static void c CamCryptVG2_SetSeed(const unsigned char *Key1, const unsigned char *Key2)65 static void cam_videoguard_LongMult(unsigned short *pData, unsigned short *pLen, unsigned int mult, unsigned int carry); 66 static void cam_videoguard_PartialMod(unsigned short val, unsigned int count, unsigned short *outkey, const unsigned short *inkey); 67 static void cam_videoguard_RotateRightAndHash(unsigned char *p); 68 static void cam_videoguard_Reorder16A(unsigned char *dest, const unsigned char *src); 69 static void cam_videoguard_ReorderAndEncrypt(unsigned char *p); 70 static void cam_videoguard_Process_D0(const unsigned char *ins, unsigned char *data, const unsigned char *status); 71 static void cam_videoguard_Process_D1(const unsigned char *ins, unsigned char *data, const unsigned char *status); 72 static void cam_videoguard_Decrypt_D3(unsigned char *ins, unsigned char *data, const unsigned char *status); 73 static void cam_videoguard_PostProcess_Decrypt(unsigned char *buff, int len, unsigned char *cw1, unsigned char *cw2); 74 static void cam_videoguard_SetSeed(const unsigned char *Key1, const unsigned char *Key2); 75 static void cam_videoguard_GetCamKey(unsigned char *buff); 76 77 static void cam_videoguard_SetSeed(const unsigned char *Key1, const unsigned char *Key2) 78 78 { 79 79 memcpy(cardkeys[1], Key1, sizeof (cardkeys[1])); … … 81 81 } 82 82 83 static void c CamCryptVG2_GetCamKey(unsigned char *buff)83 static void cam_videoguard_GetCamKey(unsigned char *buff) 84 84 { 85 85 unsigned short *tb2 = (unsigned short *) buff, c = 1; … … 90 90 91 91 for (i = 0; i < 32; i++) 92 c CamCryptVG2_LongMult(tb2, &c, cardkeys[1][i], 0);93 } 94 95 static void c CamCryptVG2_PostProcess_Decrypt(unsigned char *buff, int len, unsigned char *cw1, unsigned char *cw2)92 cam_videoguard_LongMult(tb2, &c, cardkeys[1][i], 0); 93 } 94 95 static void cam_videoguard_PostProcess_Decrypt(unsigned char *buff, int len, unsigned char *cw1, unsigned char *cw2) 96 96 { 97 97 switch (buff[0]) { 98 98 case 0xD0: 99 c CamCryptVG2_Process_D0(buff, buff + 5, buff + buff[4] + 5);99 cam_videoguard_Process_D0(buff, buff + 5, buff + buff[4] + 5); 100 100 break; 101 101 case 0xD1: 102 c CamCryptVG2_Process_D1(buff, buff + 5, buff + buff[4] + 5);102 cam_videoguard_Process_D1(buff, buff + 5, buff + buff[4] + 5); 103 103 break; 104 104 case 0xD3: 105 c CamCryptVG2_Decrypt_D3(buff, buff + 5, buff + buff[4] + 5);105 cam_videoguard_Decrypt_D3(buff, buff + 5, buff + buff[4] + 5); 106 106 if (buff[1] == 0x54) { 107 107 memcpy(cw1, buff + 5, 8); … … 122 122 } 123 123 124 static void c CamCryptVG2_Process_D0(const unsigned char *ins, unsigned char *data, const unsigned char *status)124 static void cam_videoguard_Process_D0(const unsigned char *ins, unsigned char *data, const unsigned char *status) 125 125 { 126 126 switch (ins[1]) { … … 154 154 t >>= 1; 155 155 } 156 c CamCryptVG2_PartialMod(carry, count2, key2, key1);156 cam_videoguard_PartialMod(carry, count2, key2, key1); 157 157 } 158 158 unsigned short idatacount = 0; … … 160 160 161 161 for (i = 31; i >= 0; i--) 162 c CamCryptVG2_LongMult(idata, &idatacount, key1[i], key2[i]);162 cam_videoguard_LongMult(idata, &idatacount, key1[i], key2[i]); 163 163 unsigned char stateD1[16]; 164 164 165 c CamCryptVG2_Reorder16A(stateD1, data);166 c AES_SetKey(stateD1);167 break; 168 } 169 } 170 } 171 172 static void c CamCryptVG2_Process_D1(const unsigned char *ins, unsigned char *data, const unsigned char *status)165 cam_videoguard_Reorder16A(stateD1, data); 166 cam_videoguard_cAES_SetKey(stateD1); 167 break; 168 } 169 } 170 } 171 172 static void cam_videoguard_Process_D1(const unsigned char *ins, unsigned char *data, const unsigned char *status) 173 173 { 174 174 unsigned char iter[16], tmp[16]; … … 203 203 if (docalc) { 204 204 xor16(iter, in, tmp); 205 c CamCryptVG2_ReorderAndEncrypt(tmp);205 cam_videoguard_ReorderAndEncrypt(tmp); 206 206 xor16(tmp, stateD3A, iter); 207 207 } … … 210 210 } 211 211 212 static void c CamCryptVG2_Decrypt_D3(unsigned char *ins, unsigned char *data, const unsigned char *status)212 static void cam_videoguard_Decrypt_D3(unsigned char *ins, unsigned char *data, const unsigned char *status) 213 213 { 214 214 if (ins[4] > 16) … … 237 237 iter[0] += blockindex; 238 238 xor16(iter, stateD3A, iter); 239 c CamCryptVG2_ReorderAndEncrypt(iter);239 cam_videoguard_ReorderAndEncrypt(iter); 240 240 xor16(iter, &data[blockindex * 16], states[blockindex]); 241 241 if (blockindex == (len1 >> 4)) { … … 246 246 } 247 247 xor16(states[blockindex], stateD3A, stateD3A); 248 c CamCryptVG2_RotateRightAndHash(stateD3A);248 cam_videoguard_RotateRightAndHash(stateD3A); 249 249 } 250 250 memset(tmp, 0, sizeof (tmp)); 251 251 memcpy(tmp + 5, status, 2); 252 252 xor16(tmp, stateD3A, stateD3A); 253 c CamCryptVG2_ReorderAndEncrypt(stateD3A);253 cam_videoguard_ReorderAndEncrypt(stateD3A); 254 254 255 255 memcpy(stateD3A, status - 16, sizeof (stateD3A)); 256 c CamCryptVG2_ReorderAndEncrypt(stateD3A);256 cam_videoguard_ReorderAndEncrypt(stateD3A); 257 257 258 258 memcpy(data, states[0], len1); 259 259 if (ins[1] == 0xbe) { 260 c CamCryptVG2_Reorder16A(tmp, states[0]);261 c AES_SetKey(tmp);262 } 263 } 264 265 static void c CamCryptVG2_ReorderAndEncrypt(unsigned char *p)260 cam_videoguard_Reorder16A(tmp, states[0]); 261 cam_videoguard_cAES_SetKey(tmp); 262 } 263 } 264 265 static void cam_videoguard_ReorderAndEncrypt(unsigned char *p) 266 266 { 267 267 unsigned char tmp[16]; 268 268 269 c CamCryptVG2_Reorder16A(tmp, p);270 c AES_Encrypt(tmp, 16, tmp);271 c CamCryptVG2_Reorder16A(p, tmp);269 cam_videoguard_Reorder16A(tmp, p); 270 cam_videoguard_cAES_Encrypt(tmp, 16, tmp); 271 cam_videoguard_Reorder16A(p, tmp); 272 272 } 273 273 274 274 // reorder AAAABBBBCCCCDDDD to ABCDABCDABCDABCD 275 275 276 static void c CamCryptVG2_Reorder16A(unsigned char *dest, const unsigned char *src)276 static void cam_videoguard_Reorder16A(unsigned char *dest, const unsigned char *src) 277 277 { 278 278 int i; … … 285 285 } 286 286 287 static void c CamCryptVG2_LongMult(unsigned short *pData, unsigned short *pLen, unsigned int mult, unsigned int carry)287 static void cam_videoguard_LongMult(unsigned short *pData, unsigned short *pLen, unsigned int mult, unsigned int carry) 288 288 { 289 289 int i; … … 298 298 } 299 299 300 static void c CamCryptVG2_PartialMod(unsigned short val, unsigned int count, unsigned short *outkey, const unsigned short *inkey)300 static void cam_videoguard_PartialMod(unsigned short val, unsigned int count, unsigned short *outkey, const unsigned short *inkey) 301 301 { 302 302 if (count) { … … 340 340 }; 341 341 342 static void c CamCryptVG2_RotateRightAndHash(unsigned char *p)342 static void cam_videoguard_RotateRightAndHash(unsigned char *p) 343 343 { 344 344 unsigned char t1 = p[15]; … … 373 373 374 374 struct CmdTab *cmd_table = NULL; 375 static void memorize_cmd_table(const unsigned char *mem, int size)375 static void cam_videoguard_memorize_cmd_table(const unsigned char *mem, int size) 376 376 { 377 377 cmd_table = (struct CmdTab *) malloc(sizeof (unsigned char) * size); … … 379 379 } 380 380 381 static int c md_table_get_info(const unsigned char *cmd, unsigned char *rlen, unsigned char *rmode)381 static int cam_videoguard_cmd_table_get_info(const unsigned char *cmd, unsigned char *rlen, unsigned char *rmode) 382 382 { 383 383 struct CmdTabEntry *pcte = cmd_table->e; … … 393 393 } 394 394 395 static int status_ok(const unsigned char *status) 396 { 397 //cs_log("check status %02x%02x", status[0],status[1]); 395 static int cam_videoguard_status_ok(const unsigned char *status) 396 { 398 397 return (status[0] == 0x90 || status[0] == 0x91) 399 398 && (status[1] == 0x00 || status[1] == 0x01 || status[1] == 0x20 || status[1] == 0x21 || status[1] == 0x80 || status[1] == 0x81 || status[1] == 0xa0 || status[1] == 0xa1); … … 416 415 } 417 416 418 static int do_cmd(const unsigned char *ins, const unsigned char *txbuff, unsigned char *rxbuff, uchar *result, ushort result_max_size, ushort *result_size)417 static int cam_videoguard_do_cmd(const unsigned char *ins, const unsigned char *txbuff, unsigned char *rxbuff, uchar *result, ushort result_max_size, ushort *result_size) 419 418 { 420 419 unsigned char ins2[5]; … … 423 422 unsigned char len = 0, mode = 0; 424 423 425 if (c md_table_get_info(ins2, &len, &mode)) {424 if (cam_videoguard_cmd_table_get_info(ins2, &len, &mode)) { 426 425 if (len == 0xFF && mode == 2) { 427 426 if (ins2[4] == 0) … … 439 438 rxbuff = tmp; 440 439 if (mode > 1) { 441 if (!cam_common_cmd2card(ins2, sizeof(ins2), result, result_max_size, result_size) || ! status_ok(result + len))440 if (!cam_common_cmd2card(ins2, sizeof(ins2), result, result_max_size, result_size) || !cam_videoguard_status_ok(result + len)) 442 441 return -1; 443 442 memcpy(rxbuff, ins2, 5); … … 448 447 memcpy(cmd, ins2, 5); 449 448 memcpy(cmd + 5, txbuff, ins2[4]); 450 if (!cam_common_cmd2card(cmd, 5 + ins2[4], result, sizeof(result), result_size) || ! status_ok(result))449 if (!cam_common_cmd2card(cmd, 5 + ins2[4], result, sizeof(result), result_size) || !cam_videoguard_status_ok(result)) 451 450 return -2; 452 451 memcpy(rxbuff, ins2, 5); … … 455 454 } 456 455 457 c CamCryptVG2_PostProcess_Decrypt(rxbuff, len, CW1, CW2);456 cam_videoguard_PostProcess_Decrypt(rxbuff, len, CW1, CW2); 458 457 459 458 return len; … … 461 460 462 461 #define BASEYEAR 1997 463 static void rev_date_calc(const unsigned char *Date, int *year, int *mon, int *day, int *hh, int *mm, int *ss)462 static void cam_videoguard_rev_date_calc(const unsigned char *Date, int *year, int *mon, int *day, int *hh, int *mm, int *ss) 464 463 { 465 464 *year = (Date[0] / 12) + BASEYEAR; … … 471 470 } 472 471 473 static void read_tiers()472 static void cam_videoguard_read_tiers() 474 473 { 475 474 static const unsigned char ins2a[5] = { 0xd0, 0x2a, 0x00, 0x00, 0x00 }; … … 478 477 uchar result[260]; 479 478 ushort result_size; 480 l = do_cmd(ins2a, NULL, NULL, result, sizeof(result), &result_size);481 if (l < 0 || ! status_ok(result + l))479 l = cam_videoguard_do_cmd(ins2a, NULL, NULL, result, sizeof(result), &result_size); 480 if (l < 0 || !cam_videoguard_status_ok(result + l)) 482 481 return; 483 482 static unsigned char ins76[5] = { 0xd0, 0x76, 0x00, 0x00, 0x00 }; 484 483 ins76[3] = 0x7f; 485 484 ins76[4] = 2; 486 if (!cam_common_cmd2card(ins76, sizeof(ins76), result, sizeof(result), &result_size) || ! status_ok(result + 2))485 if (!cam_common_cmd2card(ins76, sizeof(ins76), result, sizeof(result), &result_size) || !cam_videoguard_status_ok(result + 2)) 487 486 return; 488 487 ins76[3] = 0; … … 493 492 for (i = 0; i < num; i++) { 494 493 ins76[2] = i; 495 l = do_cmd(ins76, NULL, NULL, result, sizeof(result), &result_size);496 if (l < 0 || ! status_ok(result + l))494 l = cam_videoguard_do_cmd(ins76, NULL, NULL, result, sizeof(result), &result_size); 495 if (l < 0 || !cam_videoguard_status_ok(result + l)) 497 496 return; 498 497 if (result[2] == 0 && result[3] == 0) … … 500 499 int y, m, d, H, M, S; 501 500 502 rev_date_calc(&result[4], &y, &m, &d, &H, &M, &S);501 cam_videoguard_rev_date_calc(&result[4], &y, &m, &d, &H, &M, &S); 503 502 cs_log("Tier: %02x%02x, expiry date: %04d/%02d/%02d-%02d:%02d:%02d", result[2], result[3], y, m, d, H, M, S); 504 503 } 505 504 } 506 505 507 static unsigned int num_addr(const unsigned char *data)506 static unsigned int cam_videoguard_num_addr(const unsigned char *data) 508 507 { 509 508 return ((data[3] & 0x30) >> 4) + 1; 510 509 } 511 510 512 static int addr_mode(const unsigned char *data)511 static int cam_videoguard_addr_mode(const unsigned char *data) 513 512 { 514 513 switch (data[3] & 0xC0) { … … 522 521 } 523 522 524 static const unsigned char * payload_addr(const unsigned char *data, const unsigned char *a)523 static const unsigned char *cam_videoguard_payload_addr(const unsigned char *data, const unsigned char *a) 525 524 { 526 525 int s; … … 528 527 const unsigned char *ptr = NULL; 529 528 530 switch ( addr_mode(data)) {529 switch (cam_videoguard_addr_mode(data)) { 531 530 case 2: 532 531 s = 3; … … 541 540 int position = -1; 542 541 543 for (l = 0; l < num_addr(data); l++) {542 for (l = 0; l < cam_videoguard_num_addr(data); l++) { 544 543 if (!memcmp(&data[l * 4 + 4], a + 4, s)) { 545 544 position = l; … … 549 548 550 549 /* skip header, the list of address, and the separator (the two 00 00) */ 551 ptr = data + 4 + 4 * num_addr(data) + 2;550 ptr = data + 4 + 4 * cam_videoguard_num_addr(data) + 2; 552 551 553 552 /* skip optional 00 */ … … 630 629 uchar result[260]; 631 630 ushort result_size; 632 if (!cam_common_cmd2card(ins7401, sizeof(ins7401), result, sizeof(result), &result_size) || ! status_ok(result + l)) {631 if (!cam_common_cmd2card(ins7401, sizeof(ins7401), result, sizeof(result), &result_size) || !cam_videoguard_status_ok(result + l)) { 633 632 cs_log("failed to read cmd list"); 634 633 return 0; 635 634 } 636 memorize_cmd_table(result, l);635 cam_videoguard_memorize_cmd_table(result, l); 637 636 638 637 unsigned char buff[256]; 639 638 640 639 unsigned char ins7416[5] = { 0xD0, 0x74, 0x16, 0x00, 0x00 }; 641 if ( do_cmd(ins7416, NULL, NULL, result, sizeof(result), &result_size) < 0) {640 if (cam_videoguard_do_cmd(ins7416, NULL, NULL, result, sizeof(result), &result_size) < 0) { 642 641 cs_log("cmd 7416 failed"); 643 642 return 0; … … 658 657 int boxidOK = 0; 659 658 660 l = do_cmd(ins36, NULL, buff, result, sizeof(result), &result_size);659 l = cam_videoguard_do_cmd(ins36, NULL, buff, result, sizeof(result), &result_size); 661 660 if (l >= 0) { 662 661 int i; … … 683 682 memcpy(cmd, ins4C, 5); 684 683 memcpy(cmd + 5, payload4C, ins4C[4]); 685 if (!cam_common_cmd2card(cmd, 5 + ins4C[4], result, sizeof(result), &result_size) || ! status_ok(result + l)) {684 if (!cam_common_cmd2card(cmd, 5 + ins4C[4], result, sizeof(result), &result_size) || !cam_videoguard_status_ok(result + l)) { 686 685 cs_log("sending boxid failed"); 687 686 return 0; … … 689 688 690 689 unsigned char ins58[5] = { 0xD0, 0x58, 0x00, 0x00, 0x00 }; 691 l = do_cmd(ins58, NULL, buff, result, sizeof(result), &result_size);690 l = cam_videoguard_do_cmd(ins58, NULL, buff, result, sizeof(result), &result_size); 692 691 if (l < 0) { 693 692 cs_log("cmd ins58 failed"); … … 714 713 0x0c, 0xcf, 0xb4, 0x2b, 0x3a, 0x2f, 0xd2, 0x09, 0x92, 0x15, 0x40, 0x47, 0x66, 0x5c, 0xda, 0xc9 715 714 }; 716 c CamCryptVG2_SetSeed(seed1, seed2);715 cam_videoguard_SetSeed(seed1, seed2); 717 716 718 717 unsigned char insB4[5] = { 0xD0, 0xB4, 0x00, 0x00, 0x40 }; 719 718 unsigned char tbuff[64]; 720 719 721 c CamCryptVG2_GetCamKey(tbuff);722 l = do_cmd(insB4, tbuff, NULL, result, sizeof(result), &result_size);723 if (l < 0 || ! status_ok(result)) {720 cam_videoguard_GetCamKey(tbuff); 721 l = cam_videoguard_do_cmd(insB4, tbuff, NULL, result, sizeof(result), &result_size); 722 if (l < 0 || !cam_videoguard_status_ok(result)) { 724 723 cs_log("cmd D0B4 failed (%02X%02X)", result[0], result[1]); 725 724 return 0; … … 727 726 728 727 unsigned char insBC[5] = { 0xD0, 0xBC, 0x00, 0x00, 0x00 }; 729 l = do_cmd(insBC, NULL, NULL, result, sizeof(result), &result_size);728 l = cam_videoguard_do_cmd(insBC, NULL, NULL, result, sizeof(result), &result_size); 730 729 if (l < 0) { 731 730 cs_log("cmd D0BC failed"); … … 734 733 735 734 unsigned char insBE[5] = { 0xD3, 0xBE, 0x00, 0x00, 0x00 }; 736 l = do_cmd(insBE, NULL, NULL, result, sizeof(result), &result_size);735 l = cam_videoguard_do_cmd(insBE, NULL, NULL, result, sizeof(result), &result_size); 737 736 if (l < 0) { 738 737 cs_log("cmd D3BE failed"); … … 741 740 742 741 unsigned char ins58a[5] = { 0xD1, 0x58, 0x00, 0x00, 0x00 }; 743 l = do_cmd(ins58a, NULL, NULL, result, sizeof(result), &result_size);742 l = cam_videoguard_do_cmd(ins58a, NULL, NULL, result, sizeof(result), &result_size); 744 743 if (l < 0) { 745 744 cs_log("cmd D158 failed"); … … 748 747 749 748 unsigned char ins4Ca[5] = { 0xD1, 0x4C, 0x00, 0x00, 0x00 }; 750 l = do_cmd(ins4Ca, payload4C, NULL, result, sizeof(result), &result_size);751 if (l < 0 || ! status_ok(result)) {749 l = cam_videoguard_do_cmd(ins4Ca, payload4C, NULL, result, sizeof(result), &result_size); 750 if (l < 0 || !cam_videoguard_status_ok(result)) { 752 751 cs_log("cmd D14Ca failed"); 753 752 return 0; … … 756 755 cs_log("caid: %04X, serial: %02X%02X%02X%02X, BoxID: %02X%02X%02X%02X", reader[ridx].caid[0], reader[ridx].hexserial[4], reader[ridx].hexserial[5], reader[ridx].hexserial[6], reader[ridx].hexserial[7], boxID[0], boxID[1], boxID[2], boxID[3]); 757 756 758 read_tiers();757 cam_videoguard_read_tiers(); 759 758 760 759 return 1; … … 776 775 uchar result[260]; 777 776 ushort result_size; 778 l = do_cmd(ins40, tbuff, NULL, result, sizeof(result), &result_size);779 if (l > 0 && status_ok(result)) {780 l = do_cmd(ins54, NULL, NULL, result, sizeof(result), &result_size);781 if (l > 0 && status_ok(result + l)) {777 l = cam_videoguard_do_cmd(ins40, tbuff, NULL, result, sizeof(result), &result_size); 778 if (l > 0 && cam_videoguard_status_ok(result)) { 779 l = cam_videoguard_do_cmd(ins54, NULL, NULL, result, sizeof(result), &result_size); 780 if (l > 0 && cam_videoguard_status_ok(result + l)) { 782 781 if (er->ecm[0] & 1) { 783 782 memcpy(er->cw + 8, CW1, 8); … … 800 799 int rc = 0; 801 800 802 const unsigned char *payload = payload_addr(ep->emm, reader[ridx].hexserial);801 const unsigned char *payload = cam_videoguard_payload_addr(ep->emm, reader[ridx].hexserial); 803 802 804 803 if (payload) { 805 804 ins42[4] = *payload; 806 int l = do_cmd(ins42, payload + 1, NULL, result, sizeof(result), &result_size);807 808 if (l > 0 && status_ok(result)) {805 int l = cam_videoguard_do_cmd(ins42, payload + 1, NULL, result, sizeof(result), &result_size); 806 807 if (l > 0 && cam_videoguard_status_ok(result)) { 809 808 rc = 1; 810 809 } 811 810 812 811 cs_log("EMM request return code : %02X%02X", result[0], result[1]); 813 if ( status_ok(result)) {814 read_tiers();812 if (cam_videoguard_status_ok(result)) { 813 cam_videoguard_read_tiers(); 815 814 } 816 815
Note:
See TracChangeset
for help on using the changeset viewer.