Commit 63579eae authored by npzacs's avatar npzacs
Browse files

Added bus encryption status to aacs_info

parent 53fd3ed2
......@@ -111,10 +111,14 @@ int main (int argc, char **argv)
const uint8_t *vid = aacs_get_vid(aacs);
const uint8_t *id = aacs_get_disc_id(aacs);
const uint8_t *pmsn = aacs_get_pmsn(aacs);
const int bec = aacs_get_bus_encryption(aacs);
printf("Disc ID: %s\n", id ? _hex2str(id, 20) : "???");
printf("VID : %s\n", vid ? _hex2str(vid, 16) : "???");
printf("MKBv : %d\n", aacs_get_mkb_version(aacs));
printf("PMSN : %s\n", pmsn ? _hex2str(pmsn, 16) : "???");
printf("Bus encryption:\n");
printf(" Device support: %s\n", (bec & AACS_BUS_ENCRYPTION_CAPABLE) ? "yes" : "no");
printf(" Enabled in media: %s\n", (bec & AACS_BUS_ENCRYPTION_ENABLED) ? "yes" : "no");
aacs_close(aacs);
......
......@@ -974,6 +974,13 @@ AACS_RL_ENTRY *aacs_get_drl(int *num_records, int *mkbv)
return _get_rl("drl", num_records, mkbv);
}
uint32_t aacs_get_bus_encryption(AACS *aacs)
{
return (aacs->bee * AACS_BUS_ENCRYPTION_ENABLED) |
(aacs->bec * AACS_BUS_ENCRYPTION_CAPABLE);
}
void aacs_select_title(AACS *aacs, uint32_t title)
{
if (!aacs) {
......
......@@ -61,4 +61,11 @@ typedef struct {
AACS_PUBLIC AACS_RL_ENTRY *aacs_get_hrl(int *num_entries, int *mkb_version);
AACS_PUBLIC AACS_RL_ENTRY *aacs_get_drl(int *num_entries, int *mkb_version);
/* bus encryption info */
#define AACS_BUS_ENCRYPTION_ENABLED 0x01 /* Bus encryption enabled in the media */
#define AACS_BUS_ENCRYPTION_CAPABLE 0x02 /* Bus encryption capable drive */
AACS_PUBLIC uint32_t aacs_get_bus_encryption(AACS *);
#endif /* AACS_H_ */
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