Skip to content

Commit

Permalink
Support new elements, most importantly "Critical Security Update Vers…
Browse files Browse the repository at this point in the history
…ion"

Should fix:

[30/12 20:01:53.761 AD2]: req element 49
[30/12 20:01:53.761 AD2]: element_get: invalid id
[30/12 20:01:53.761 AD2]: can not get element 49
[30/12 20:01:53.761 AD2]: cannot get element 49
[30/12 20:01:53.761 AD2]: cannot req data
  • Loading branch information
Jalle19 committed Jun 25, 2024
1 parent 99cbc43 commit bfa9554
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/ca.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,14 @@ char logfile[256];
int extract_ci_cert = 0;
int has_ci = 0;

// See Annex A (normative): Parameters exchanged in APDUs
uint32_t datatype_sizes[MAX_ELEMENTS] = {
0, 50, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 32, 256, 256, 0, 0,
256, 256, 32, 8, 8, 32, 32, 0, 8, 2, 32, 1, 32, 1, 0, 32};
0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, // 0-11
32, 256, 256, 0, 0, 256, 256, 32, // 12-19
8, 8, 32, 32, 0, 8, 2, 32, 1, 32, // 20-29
1, 0, 32, 0, 1, 1, 0, 1, 1, 0, 1, // 30-40
1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, // 41-51
4, 0, 1, 0}; // 52-55

int dvbca_id;
ca_device_t *ca_devices[MAX_ADAPTERS];
Expand Down
2 changes: 1 addition & 1 deletion src/ca.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#define MAX_SESSIONS 64
#define PMT_INVALID -1
#define PMT_ID_IS_VALID(x) (x > PMT_INVALID)
#define MAX_ELEMENTS 33
#define MAX_ELEMENTS 56
#define MAX_PAIRS 10

#define SIZE_INDICATOR 0x80
Expand Down

0 comments on commit bfa9554

Please sign in to comment.