Changeset 2955 for trunk/reader-seca.c
- Timestamp:
- 08/27/10 12:15:01 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/reader-seca.c
r2774 r2955 130 130 i=get_prov_index(reader, (char *) er->ecm+3); 131 131 if ((i == -1) || (reader->availkeys[i][0] == 0)) //if provider not found or expired 132 { 133 if( i == -1 ) 134 snprintf( er->msglog, MSGLOGSIZE, "provider not found" ); 135 else 136 snprintf( er->msglog, MSGLOGSIZE, "provider expired" ); 137 132 138 return ERROR; 139 } 140 133 141 ins3c[2]=i; 134 142 ins3c[3]=er->ecm[7]; //key nr … … 142 150 write_cmd(ins3c, er->ecm+8); //ecm request 143 151 } 144 if ((cta_res[0] != 0x90) || (cta_res[1] != 0x00)) return ERROR;152 if ((cta_res[0] != 0x90) || (cta_res[1] != 0x00)) { snprintf( er->msglog, MSGLOGSIZE, "ins3c card response: %02x %02x", cta_res[0] , cta_res[1] ); return ERROR; } 145 153 write_cmd(ins3a, NULL); //get cw's 146 if ((cta_res[16] != 0x90) || (cta_res[17] != 0x00)) return ERROR;//exit if response is not 90 00 //TODO: if response is 9027 ppv mode is possible!154 if ((cta_res[16] != 0x90) || (cta_res[17] != 0x00)) { snprintf( er->msglog, MSGLOGSIZE, "ins3a card response: %02x %02x", cta_res[16] , cta_res[17] ); return ERROR; };//exit if response is not 90 00 //TODO: if response is 9027 ppv mode is possible! 147 155 memcpy(er->cw,cta_res,16); 148 156 return OK; … … 262 270 i=get_prov_index(reader, (char *) ep->emm+9); 263 271 if (i==-1) 272 { 273 cs_log("[seca-reader] EMM: provider id not found."); 264 274 return ERROR; 275 } 276 265 277 ins40[2]=i; 266 278 write_cmd(ins40, ep->emm + ins40data_offset); //emm request
Note:
See TracChangeset
for help on using the changeset viewer.