Changeset 947
- Timestamp:
- 12/24/09 17:50:04 (14 years ago)
- Location:
- branches/smartreader
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/smartreader/CMakeLists.txt
r821 r947 229 229 ) 230 230 231 #if the svnversion program is absent, this will leave the SVN_REVISION string empty, 232 #but won't stop CMake. 233 execute_process (COMMAND "svnversion" "-n" "${CMAKE_CURRENT_SOURCE_DIR}" OUTPUT_VARIABLE OSCAM_SVN_REVISION) 234 235 if (OSCAM_SVN_REVISION) 236 string (REGEX REPLACE "[0-9]+:" "" OSCAM_SVN_REVISION "${OSCAM_SVN_REVISION}") 237 string (REPLACE "M" "" OSCAM_SVN_REVISION "${OSCAM_SVN_REVISION}") 238 string (REPLACE "exported" "0" OSCAM_SVN_REVISION "${OSCAM_SVN_REVISION}") 239 else (OSCAM_SVN_REVISION) 240 set (OSCAM_SVN_REVISION "0") 241 endif (OSCAM_SVN_REVISION) 242 231 243 # pass the version to the compilations as a define 232 add_definitions ("-D'CS_SVN_VERSION=\"$ (shell svnversion -n ${CMAKE_CURRENT_SOURCE_DIR} | sed 's/[MS]$$//')\"'")244 add_definitions ("-D'CS_SVN_VERSION=\"${OSCAM_SVN_REVISION}\"'") 233 245 234 246 #----------------------- global compile and link options ------------------------------ -
branches/smartreader/cscrypt/bn_mul.c
r8 r947 225 225 int n, BN_ULONG *t) 226 226 { 227 int i,j,n2=n*2;228 unsigned int c1,c2,neg,zero;227 int c1,c2,i,j,n2=n*2; 228 unsigned int neg,zero; 229 229 BN_ULONG ln,lo,*p; 230 230 … … 679 679 if (i == 1 && !BN_get_flags(b,BN_FLG_STATIC_DATA)) 680 680 { 681 bn_wexpand(b,al);681 if (bn_wexpand(b,al) == NULL) goto err; 682 682 b->d[bl]=0; 683 683 bl++; … … 686 686 else if (i == -1 && !BN_get_flags(a,BN_FLG_STATIC_DATA)) 687 687 { 688 bn_wexpand(a,bl);688 if (bn_wexpand(a,bl) == NULL) goto err; 689 689 a->d[al]=0; 690 690 al++; … … 701 701 if (al == j) /* exact multiple */ 702 702 { 703 bn_wexpand(t,k*2);704 bn_wexpand(rr,k*2);703 if (bn_wexpand(t,k*2) == NULL) goto err; 704 if (bn_wexpand(rr,k*2) == NULL) goto err; 705 705 bn_mul_recursive(rr->d,a->d,b->d,al,t->d); 706 706 } 707 707 else 708 708 { 709 bn_wexpand(a,k);710 bn_wexpand(b,k);711 bn_wexpand(t,k*4);712 bn_wexpand(rr,k*4);709 if (bn_wexpand(a,k) == NULL) goto err; 710 if (bn_wexpand(b,k) == NULL) goto err; 711 if (bn_wexpand(t,k*4) == NULL) goto err; 712 if (bn_wexpand(rr,k*4) == NULL) goto err; 713 713 for (i=a->top; i<k; i++) 714 714 a->d[i]=0; -
branches/smartreader/module-cccam.c
r934 r947 675 675 return 0; 676 676 } 677 677 /* 678 678 static int cc_abort_user_ecms(){ 679 679 int n, i; … … 700 700 701 701 } 702 702 */ 703 703 static cc_msg_type_t cc_parse_msg(uint8 *buf, int l) 704 704 { … … 954 954 pfd=client[cs_idx].udp_fd; 955 955 956 if (cc_send_cli_data( cc)<=0) {956 if (cc_send_cli_data()<=0) { 957 957 cs_log("cccam: login failed, could not send client data"); 958 958 return -3; -
branches/smartreader/reader-common.c
r849 r947 440 440 sprintf (token, "%swrite_%s_%s.%s", cs_confdir, (ep->emm[0] == 0x82) ? "UNIQ" : "SHARED", buf, "txt"); 441 441 if (!(fp = fopen (token, "w"))) 442 cs_log ("ERROR: Cannot open EMM.txt file '%s' (errno=%d)\n", token, errno); 443 else { 444 cs_log ("Succesfully written text EMM to %s.", token); 445 int emm_length = ((ep->emm[1] & 0x0f) << 8) | ep->emm[2]; 446 fprintf (fp, "%s", cs_hexdump (0, ep->emm, emm_length + 3)); 447 fclose (fp); 442 { 443 cs_log ("ERROR: Cannot open EMM.txt file '%s' (errno=%d)\n", token, errno); 444 } 445 else 446 { 447 cs_log ("Succesfully written text EMM to %s.", token); 448 int emm_length = ((ep->emm[1] & 0x0f) << 8) | ep->emm[2]; 449 fprintf (fp, "%s", cs_hexdump (0, ep->emm, emm_length + 3)); 450 fclose (fp); 448 451 } 449 452 … … 451 454 sprintf (token, "%swrite_%s_%s.%s", cs_confdir, (ep->emm[0] == 0x82) ? "UNIQ" : "SHARED", buf, "emm"); 452 455 if (!(fp = fopen (token, "wb"))) 453 cs_log ("ERROR: Cannot open EMM.emm file '%s' (errno=%d)\n", token, errno); 454 else { 455 cs_log ("Succesfully written binary EMM to %s.", token); 456 fwrite (ep, sizeof (*ep), 1, fp); 457 fclose (fp); 456 { 457 cs_log ("ERROR: Cannot open EMM.emm file '%s' (errno=%d)\n", token, errno); 458 } 459 else 460 { 461 if (fwrite(ep, sizeof (*ep), 1, fp) == 1) 462 { 463 cs_log ("Succesfully written binary EMM to %s.", token); 464 } 465 else 466 { 467 cs_log ("ERROR: Cannot write binary EMM to %s (errno=%d)\n", token, errno); 468 } 469 fclose (fp); 458 470 } 459 471 } -
branches/smartreader/reader-dre.c
r842 r947 113 113 case 0xe2: 114 114 cs_log ("DRECRYPT wrong provider: %s.", cs_hexdump (0, cta_res, cta_lr)); 115 break; 116 case 0xe3: 117 cs_log ("DRECRYPT illegal command: %s.", cs_hexdump (0, cta_res, cta_lr)); 115 118 break; 116 119 case 0xec: … … 315 318 for (i = 0; i < 2; i++) { 316 319 memcpy (emmcmd52 + 1, ep->emm + 5 + 32 + i * 56, 56); 320 // check for shared address 321 if(ep->emm[3]!=reader[ridx].sa[0][0]) 322 return 1; // ignore, wrong address 317 323 emmcmd52[0x39] = provider; 318 324 if ((dre_cmd (emmcmd52)))
Note:
See TracChangeset
for help on using the changeset viewer.