Commit 24466667 authored by hpi1's avatar hpi1

Convert vid in parser

parent f074d50b
......@@ -73,8 +73,8 @@ static int print_title_entries(title_entry_list *list)
#endif
if (memcmp(cursor->entry.mk, empty_key, 16))
printf(" MEK: %s\n", str_print_hex(tmp, cursor->entry.mk, 16));
if (cursor->entry.vid)
printf(" VID: %s\n", cursor->entry.vid);
if (memcmp(cursor->entry.vid, empty_key, 16))
printf(" VID: %s\n", str_print_hex(tmp, cursor->entry.vid, 16));
#if 0
if (cursor->entry.bn)
{
......
......@@ -547,7 +547,6 @@ int keydbcfg_config_file_close(config_file *cfgfile)
{
title_entry_list *next = cfgfile->list->next;
/*X_FREE(cfgfile->list->entry.title);*/
X_FREE(cfgfile->list->entry.vid);
/*DIGIT_KEY_PAIR_LIST_FREE(cfgfile->list->entry.bn);*/
/*DIGIT_KEY_PAIR_LIST_FREE(cfgfile->list->entry.pak);*/
/*DIGIT_KEY_PAIR_LIST_FREE(cfgfile->list->entry.tk);*/
......@@ -734,8 +733,8 @@ static int add_entry(title_entry_list *list, int type, char *entry)
case ENTRY_TYPE_VID:
CHECK_KEY_LENGTH("vid", 32)
X_FREE(list->entry.vid);
list->entry.vid = entry;
hexstring_to_hex_array(list->entry.vid, 16, entry);
X_FREE(entry);
break;
case ENTRY_TYPE_VUK:
......
......@@ -90,7 +90,7 @@ struct title_entry_t
//char *title;
//date_entry date;
uint8_t mk[16];
char *vid;
uint8_t vid[16];
//digit_key_pair_list *bn;
uint8_t vuk[16];
//digit_key_pair_list *pak;
......
......@@ -806,9 +806,8 @@ static void _find_config_entry(AACS *aacs, title_entry_list *ce,
str_print_hex(str2, ce->entry.discid, 20), str_print_hex(str, mk, 16));
}
if (ce->entry.vid) {
hexstring_to_hex_array(aacs->vid, sizeof(aacs->vid),
ce->entry.vid);
if (memcmp(ce->entry.vid, empty_key, 16)) {
memcpy(aacs->vid, ce->entry.vid, 16);
BD_DEBUG(DBG_AACS, "Found volume id for %s: %s\n",
str_print_hex(str2, ce->entry.discid, 20), str_print_hex(str, aacs->vid, 16));
......
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