Today I've found time to fix the problem - at least on my windows kodi I can play the 'special' iso and encrypted iso's without problems - so hopefully it's also working on the RPi2
Code:
--- aacs_orig.c 2015-03-13 10:20:13.000000000 +0100
+++ aacs.c 2015-12-08 10:54:21.636131922 +0100
@@ -282,6 +282,7 @@
num_uvs = len / 5;
if (num_uvs < 1) {
+ BD_DEBUG(DBG_AACS, "No UVS detected - corrupted disc\n");
return AACS_ERROR_CORRUPTED_DISC;
}
@@ -663,6 +664,7 @@
uint8_t *mk, uint8_t *vuk)
{
char str[48];
+ char str2[48];
aacs->uks = NULL;
aacs->num_uks = 0;
@@ -684,7 +686,7 @@
hexstring_to_hex_array(mk, 16, ce->entry.mek);
BD_DEBUG(DBG_AACS, "Found media key for %s: %s\n",
- ce->entry.discid, str_print_hex(str, mk, 16));
+ str_print_hex(str2, ce->entry.discid, 20), str_print_hex(str, mk, 16));
}
if (ce->entry.vid) {
@@ -692,14 +694,14 @@
ce->entry.vid);
BD_DEBUG(DBG_AACS, "Found volume id for %s: %s\n",
- ce->entry.discid, str_print_hex(str, aacs->vid, 16));
+ str_print_hex(str2, ce->entry.discid, 20), str_print_hex(str, aacs->vid, 16));
}
if (ce->entry.vuk) {
hexstring_to_hex_array(vuk, 16, ce->entry.vuk);
BD_DEBUG(DBG_AACS, "Found volume unique key for %s: %s\n",
- ce->entry.discid, str_print_hex(str, vuk, 16));
+ str_print_hex(str2, ce->entry.discid, 20), str_print_hex(str, vuk, 16));
}
if (ce->entry.uk) {
@@ -1007,12 +1009,17 @@
{
config_file *cf;
int error_code;
+ /* in case the unit_key_ro.inf contains only NULL byte values it's SHA1 hash is 'ec6afe5df8a1325068b95313f82bd72c09d4f963' - there are a few unencrypted discs available that need a special workaround */
+ const uint8_t null_byte_discid[20] = { 0xec, 0x6a, 0xfe, 0x5d, 0xf8, 0xa1, 0x32, 0x50, 0x68, 0xb9, 0x53, 0x13, 0xf8, 0x2b, 0xd7, 0x2c, 0x09, 0xd4, 0xf9, 0x63 };
aacs->path = path ? str_printf("%s", path) : NULL;
error_code = _calc_title_hash(aacs);
if (error_code != AACS_SUCCESS) {
return error_code;
+ } else if (memcmp(aacs->disc_id, null_byte_discid, 20)==0) {
+ BD_DEBUG(DBG_AACS, "Detected 0-Byte AACS file - no AACS processing necessary\n");
+ return AACS_SUCCESS;
}
cf = keydbcfg_config_load(configfile_path);
@@ -1299,3 +1306,4 @@
BD_DEBUG(DBG_AACS|DBG_CRIT, "aacs_set_title(%d): invalid title !\n", title);
}
+
PS: there's no division by zero error....