Commit 4b210224 authored by npzacs's avatar npzacs
Browse files

Do not cache keys if disc id is unknown

parent 919123d9
......@@ -647,7 +647,9 @@ static int _read_vid(AACS *aacs, cert_list *hcl)
BD_DEBUG(DBG_AACS, "Error reading VID!\n");
} else {
/* cache vid */
keycache_save("vid", aacs->disc_id, aacs->vid, 16);
if (memcmp(aacs->disc_id, empty_key, sizeof(aacs->disc_id))) {
keycache_save("vid", aacs->disc_id, aacs->vid, 16);
}
}
return error_code;
}
......@@ -719,7 +721,9 @@ static int _calc_vuk(AACS *aacs, uint8_t *mk, uint8_t *vuk, config_file *cf)
BD_DEBUG(DBG_AACS, "Volume unique key: %s\n", str_print_hex(str, vuk, 16));
/* cache vuk */
keycache_save("vuk", aacs->disc_id, vuk, 16);
if (memcmp(aacs->disc_id, empty_key, sizeof(aacs->disc_id))) {
keycache_save("vuk", aacs->disc_id, vuk, 16);
}
return AACS_SUCCESS;
}
......
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