Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support new elements, most importantly "Critical Security Update Version" #1151

Merged
merged 2 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 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 Expand Up @@ -974,6 +979,11 @@ static int data_initialize(ca_device_t *d) {
LOG("can not set host_id elements");
}

uint8_t csuv = 0x00;
if (!element_set(&d->private_data, 49, &csuv, 1)) {
LOG("can not set csuv elements");
}

return 1;
}
/* content_control commands */
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
Loading