Changeset 3182


Ignore:
Timestamp:
09/23/10 09:59:11 (10 years ago)
Author:
dingo35
Message:

Readers checked on threadsafety except videoguard-common

Location:
trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/reader-common.c

    r3181 r3182  
    1 //FIXME Not checked on threadsafety yet; after checking please remove this line
    21#include "globals.h"
    32#include "reader-common.h"
  • trunk/reader-conax.c

    r3181 r3182  
    1 //FIXME Not checked on threadsafety yet; after checking please remove this line
    21#include "globals.h"
    32#include "reader-common.h"
  • trunk/reader-cryptoworks.c

    r3181 r3182  
    1 //FIXME Not checked on threadsafety yet; after checking please remove this line
    21#include "globals.h"
    32#include "reader-common.h"
  • trunk/reader-dre.c

    r3181 r3182  
    1 //FIXME Not checked on threadsafety yet; after checking please remove this line
    21#include "globals.h"
    32#include "reader-common.h"
  • trunk/reader-irdeto.c

    r3181 r3182  
    1 //FIXME Not checked on threadsafety yet; after checking please remove this line
    21#include "globals.h"
    32#include "reader-common.h"
  • trunk/reader-nagra.c

    r3181 r3182  
    1 //FIXME Not checked on threadsafety yet; after checking please remove this line
    21#include "globals.h"
    32#include "reader-common.h"
  • trunk/reader-seca.c

    r3181 r3182  
    1 //FIXME Not checked on threadsafety yet; after checking please remove this line
    21#include "globals.h"
    32#include "reader-common.h"
  • trunk/reader-tongfang.c

    r3181 r3182  
    1 //FIXME Not checked on threadsafety yet; after checking please remove this line
    21#include "globals.h"
    32#include "reader-common.h"
  • trunk/reader-viaccess.c

    r3181 r3182  
    1 //FIXME Not checked on threadsafety yet; after checking please remove this line
    21#include "globals.h"
    32#include "reader-common.h"
  • trunk/reader-videoguard-common.c

    r3181 r3182  
    154154
    155155
    156 void swap_lb (unsigned char *buff, int len)
     156void swap_lb (const unsigned char *buff, int len)
    157157{
    158158
     
    186186}
    187187
    188 void cCamCryptVG_SetSeed(unsigned char *Key1, unsigned char *Key2)
     188void cCamCryptVG_SetSeed(const unsigned char *Key1, const unsigned char *Key2)
    189189{
    190190  swap_lb (Key1, 64);
  • trunk/reader-videoguard-common.h

    r3128 r3182  
    5858extern void cAES_SetKey(const unsigned char *key);
    5959extern int cAES_Encrypt(const unsigned char *data, int len, unsigned char *crypt);
    60 extern void swap_lb (unsigned char *buff, int len);
     60extern void swap_lb (const unsigned char *buff, int len);
    6161
    6262extern void __xxor(unsigned char *data, int len, const unsigned char *v1, const unsigned char *v2);
     
    6464#define val_by2on3(x)  ((0xaaab*(x))>>16) //fixed point *2/3
    6565
    66 extern void cCamCryptVG_SetSeed(unsigned char *Key1, unsigned char *Key2);
     66extern void cCamCryptVG_SetSeed(const unsigned char *Key1, const unsigned char *Key2);
    6767extern void cCamCryptVG_GetCamKey(unsigned char *buff);
    6868
  • trunk/reader-videoguard1.c

    r3181 r3182  
    1 //FIXME Not checked on threadsafety yet; after checking please remove this line
    21#include "globals.h"
    32#include "reader-common.h"
     
    5049//    return;
    5150//  }
    52   static unsigned char ins76[5] = { 0x48, 0x76, 0x00, 0x00, 0x00 };
     51  unsigned char ins76[5] = { 0x48, 0x76, 0x00, 0x00, 0x00 };
    5352  ins76[3] = 0x7f;
    5453  ins76[4] = 2;
     
    265264{
    266265  unsigned char cta_res[CTA_RES_LEN];
    267   static unsigned char ins40[5] = { 0x48, 0x40, 0x00, 0x80, 0xFF };
     266  unsigned char ins40[5] = { 0x48, 0x40, 0x00, 0x80, 0xFF };
    268267  static const unsigned char ins54[5] = { 0x48, 0x54, 0x00, 0x00, 0x0D };
    269268  int posECMpart2 = er->ecm[6] + 7;
  • trunk/reader-videoguard12.c

    r3181 r3182  
    1 //FIXME Not checked on threadsafety yet; after checking please remove this line
    21#include "globals.h"
    32#include "reader-common.h"
     
    1110  l=do_cmd(reader,ins2a,NULL,NULL,NULL,cta_res);
    1211  if(l<0 || !status_ok(cta_res+l)) return;
    13   static unsigned char ins76[5] = { 0x48,0x76,0x00,0x00,0x00 };
     12  unsigned char ins76[5] = { 0x48,0x76,0x00,0x00,0x00 };
    1413  ins76[3]=0x7f; ins76[4]=2;
    1514  if(!write_cmd_vg(ins76,NULL) || !status_ok(cta_res+2)) return;
     
    226225   */
    227226
    228   static unsigned char seed1[] = {
     227  static const unsigned char seed1[] = {
    229228    0xb9, 0xd5, 0xef, 0xd5, 0xf5, 0xd5, 0xfb, 0xd5, 0x31, 0xd6, 0x43, 0xd6, 0x55, 0xd6, 0x61, 0xd6,
    230229    0x85, 0xd6, 0x9d, 0xd6, 0xaf, 0xd6, 0xc7, 0xd6, 0xd9, 0xd6, 0x09, 0xd7, 0x15, 0xd7, 0x21, 0xd7,
     
    232231    0x29, 0xd8, 0x2f, 0xd8, 0x4d, 0xd8, 0x8f, 0xd8, 0xa1, 0xd8, 0xad, 0xd8, 0xbf, 0xd8, 0xd7, 0xd8
    233232    };
    234   static unsigned char seed2[] = {
     233  static const unsigned char seed2[] = {
    235234    0x01, 0x00, 0xcf, 0x13, 0xe0, 0x60, 0x54, 0xac, 0xab, 0x99, 0xe6, 0x0c, 0x9f, 0x5b, 0x91, 0xb9,
    236235    0x72, 0x72, 0x4d, 0x5b, 0x5f, 0xd3, 0xb7, 0x5b, 0x01, 0x4d, 0xef, 0x9e, 0x6b, 0x8a, 0xb9, 0xd1,
     
    310309{
    311310  unsigned char cta_res[CTA_RES_LEN];
    312   static unsigned char ins40[5] = { 0x49,0x40,0x00,0x80,0xFF };
     311  unsigned char ins40[5] = { 0x49,0x40,0x00,0x80,0xFF };
    313312  static const unsigned char ins54[5] = { 0x4B,0x54,0x00,0x00,0x00};
    314313  int posECMpart2=er->ecm[6]+7;
  • trunk/reader-videoguard2.c

    r3181 r3182  
    1 //FIXME Not checked on threadsafety yet; after checking please remove this line
    21#include "globals.h"
    32#include "reader-common.h"
     
    2221  }
    2322
    24   static unsigned char ins76007f[5] = { 0xD0,0x76,0x00,0x7f,0x02 };
     23  static const unsigned char ins76007f[5] = { 0xD0,0x76,0x00,0x7f,0x02 };
    2524  if(!write_cmd_vg(ins76007f,NULL) || !status_ok(cta_res+2)){
    2625    cs_log ("[videoguard2-reader] classD0 ins76007f: failed");
     
    3029
    3130  int i;
    32   static unsigned char ins76[5] = { 0xD0,0x76,0x00,0x00,0x00 };
     31  unsigned char ins76[5] = { 0xD0,0x76,0x00,0x00,0x00 };
    3332#ifdef CS_RDR_INIT_HIST
    3433  reader->init_history_pos = 0; //reset for re-read
     
    309308{
    310309  unsigned char cta_res[CTA_RES_LEN];
    311   static unsigned char ins40[5] = { 0xD1,0x40,0x00,0x80,0xFF };
     310  unsigned char ins40[5] = { 0xD1,0x40,0x00,0x80,0xFF };
    312311  static const unsigned char ins54[5] = { 0xD3,0x54,0x00,0x00,0x00};
    313312  int posECMpart2=er->ecm[6]+7;
Note: See TracChangeset for help on using the changeset viewer.