Changeset 2796
- Timestamp:
- 07/21/10 19:08:09 (14 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/globals.h
r2776 r2796 1181 1181 extern void aes_decrypt(uchar *, int); 1182 1182 extern int aes_decrypt_from_list(AES_ENTRY *list, ushort caid, uint32 provid,int keyid, uchar *buf, int n); 1183 extern int aes_present(AES_ENTRY *list, ushort caid, uint32 provid,int keyid); 1184 1183 1185 1184 1186 extern void parse_aes_keys(struct s_reader *rdr,char *value); -
trunk/oscam-simples.c
r2778 r2796 174 174 } 175 175 176 int aes_present(AES_ENTRY *list, ushort caid, uint32 provid,int keyid) 177 { 178 AES_ENTRY *current; 179 int ok=1; 180 int error=0; 181 182 current=list; 183 while(current) { 184 if(current->caid==caid && current->ident==provid && current->keyid==keyid) 185 break; 186 current=current->next; 187 } 188 189 if(!current) { 190 cs_log("AES Decrypt : key id %d not found for CAID %04X , provider %06x",keyid,caid,provid); 191 return error; // we don't have the key to decode this buffer. 192 } 193 194 return ok; 195 } 196 176 197 char *remote_txt(void) 177 198 { -
trunk/reader-viaccess.c
r2760 r2796 282 282 provid = b2i(3, ident); 283 283 ident[2]&=0xF0; 284 285 if(hasD2) { 286 // check that we have the AES key to decode the CW 287 // if not there is no need to send the ecm to the card 288 if(!aes_present(reader->aes_list, 0x500, (uint32) provid, D2KeyID)) 289 return ERROR; 290 } 291 284 292 keynr=ecm88Data[4]&0x0F; 285 293 // 40 07 03 0b 00 -> nano 40, len =7 ident 030B00 (tntsat), key #0 <== we're pointing here
Note:
See TracChangeset
for help on using the changeset viewer.