Commit cfdfa2ac authored by npzacs's avatar npzacs
Browse files

fix disabled caching: do not write keys or revocation lists to cache

parent 883d3c07
...@@ -570,7 +570,10 @@ static int _calc_mk(AACS *aacs, uint8_t *mk, pk_list *pkl, dk_list *dkl) ...@@ -570,7 +570,10 @@ static int _calc_mk(AACS *aacs, uint8_t *mk, pk_list *pkl, dk_list *dkl)
} }
aacs->mkb_version = mkb_version(mkb); aacs->mkb_version = mkb_version(mkb);
_update_rl(mkb);
if (!aacs->no_cache) {
_update_rl(mkb);
}
/* try device keys first */ /* try device keys first */
if (dkl) { if (dkl) {
...@@ -654,8 +657,10 @@ static int _read_vid(AACS *aacs, cert_list *hcl) ...@@ -654,8 +657,10 @@ static int _read_vid(AACS *aacs, cert_list *hcl)
BD_DEBUG(DBG_AACS, "Error reading VID!\n"); BD_DEBUG(DBG_AACS, "Error reading VID!\n");
} else { } else {
/* cache vid */ /* cache vid */
if (memcmp(aacs->disc_id, empty_key, sizeof(aacs->disc_id))) { if (!aacs->no_cache) {
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; return error_code;
...@@ -728,8 +733,10 @@ static int _calc_vuk(AACS *aacs, uint8_t *mk, uint8_t *vuk, config_file *cf) ...@@ -728,8 +733,10 @@ 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)); BD_DEBUG(DBG_AACS, "Volume unique key: %s\n", str_print_hex(str, vuk, 16));
/* cache vuk */ /* cache vuk */
if (memcmp(aacs->disc_id, empty_key, sizeof(aacs->disc_id))) { if (!aacs->no_cache) {
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; 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