Commit d92b2485 authored by npzacs's avatar npzacs
Browse files

aacs_get_disc_id(): check for empty id

parent 2658af65
......@@ -92,8 +92,9 @@ struct aacs {
uint8_t device_binding_id[16];
};
static const uint8_t empty_key[16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
static const uint8_t empty_key[20] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00 };
static const uint8_t aacs_iv[16] = { 0x0b, 0xa0, 0xf8, 0xdd, 0xfe, 0xa6, 0x1f, 0xb3,
0xd8, 0xdf, 0x9f, 0x56, 0x6a, 0x05, 0x0f, 0x78 };
......@@ -1288,7 +1289,11 @@ int aacs_get_mkb_version(AACS *aacs)
const uint8_t *aacs_get_disc_id(AACS *aacs)
{
return aacs->disc_id;
if (memcmp(aacs->disc_id, empty_key, sizeof(aacs->disc_id))) {
return aacs->disc_id;
}
return NULL;
}
const uint8_t *aacs_get_content_cert_id(AACS *aacs)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment