libaacs | branch: master | npzacs <npz...@gmail.com> | Sun Jun 23 10:43:56 2013 +0300| [d5d3ae2260e17b33991660dde00407f2cb79d0db] | committer: npzacs
Log error message when drive requires bus encryption. Some new drives implement bus encryption. Such drives do not work with libaacs currently. > http://git.videolan.org/gitweb.cgi/libaacs.git/?a=commit;h=d5d3ae2260e17b33991660dde00407f2cb79d0db --- src/libaacs/mmc.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/libaacs/mmc.c b/src/libaacs/mmc.c index a0638e4..08a6901 100644 --- a/src/libaacs/mmc.c +++ b/src/libaacs/mmc.c @@ -2,7 +2,7 @@ /* * This file is part of libaacs * Copyright (C) 2009-2010 Obliter0n - * Copyright (C) 2010 npzacs + * Copyright (C) 2010-2013 npzacs * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -146,6 +146,8 @@ struct mmc { uint8_t host_nonce[20]; uint8_t host_key[20]; uint8_t host_key_point[40]; + + uint8_t bus_encryption; }; static int _mmc_send_cmd(MMC *mmc, const uint8_t *cmd, uint8_t *buf, size_t tx, @@ -512,6 +514,8 @@ static int _mmc_check_aacs(MMC *mmc) DEBUG(DBG_MMC, " Bus encryption support: %d\n", buf[4+8] & 2); DEBUG(DBG_MMC, " AGID count: %d\n", buf[6+8] & 0xf); + mmc->bus_encryption = !!(buf[4+8] & 2); + return buf[2+8] & 1; } DEBUG(DBG_MMC, "incorrect feature ID %04x\n", feature); @@ -956,6 +960,10 @@ MMC *mmc_open(const char *path) } #endif + if (mmc && mmc->bus_encryption) { + DEBUG(DBG_MMC | DBG_CRIT, "Bus encryption not implemented. Your drive requires bus encryption.\n"); + } + return mmc; } _______________________________________________ libaacs-devel mailing list libaacs-devel@videolan.org http://mailman.videolan.org/listinfo/libaacs-devel