libaacs | branch: master | npzacs <npz...@gmail.com> | Thu Nov 11 12:36:23 2010 
+0200| [622fbe051f48d6902c039efa7e7cbce5a5fa9ac9] | committer: npzacs 

mmc_open(): removed deprecated parameters nonce and host_key_point

> http://git.videolan.org/gitweb.cgi/libaacs.git/?a=commit;h=622fbe051f48d6902c039efa7e7cbce5a5fa9ac9
---

 src/libaacs/aacs.c |    7 ++-----
 src/libaacs/mmc.c  |   13 +++----------
 src/libaacs/mmc.h  |    5 ++---
 3 files changed, 7 insertions(+), 18 deletions(-)

diff --git a/src/libaacs/aacs.c b/src/libaacs/aacs.c
index b66392e..9f9926e 100644
--- a/src/libaacs/aacs.c
+++ b/src/libaacs/aacs.c
@@ -182,15 +182,12 @@ static int _calc_vuk(AACS *aacs, const char *path)
 
     cert_list *hccursor = aacs->cf->host_cert_list;
     while (hccursor && hccursor->host_priv_key && hccursor->host_cert) {
-        uint8_t priv_key[20], cert[92], nonce[20], key_point[40];
+        uint8_t priv_key[20], cert[92];
         hexstring_to_hex_array(priv_key, sizeof(priv_key),
                                hccursor->host_priv_key);
         hexstring_to_hex_array(cert, sizeof(cert), hccursor->host_cert);
-        hexstring_to_hex_array(nonce, sizeof(nonce), hccursor->host_nonce);
-        hexstring_to_hex_array(key_point, sizeof(key_point),
-                               hccursor->host_key_point);
 
-        if ((mmc = mmc_open(path, priv_key, cert, nonce, key_point))) {
+        if ((mmc = mmc_open(path, priv_key, cert))) {
             if (mmc_read_vid(mmc, aacs->vid)) {
                 gcry_cipher_hd_t gcry_h;
                 gcry_cipher_open(&gcry_h, GCRY_CIPHER_AES,
diff --git a/src/libaacs/mmc.c b/src/libaacs/mmc.c
index 525046e..1fb8175 100644
--- a/src/libaacs/mmc.c
+++ b/src/libaacs/mmc.c
@@ -357,18 +357,14 @@ static int _mmc_read_vid(MMC *mmc, uint8_t agid, uint8_t 
*volume_id,
 }
 
 MMC *mmc_open(const char *path, const uint8_t *host_priv_key,
-              const uint8_t *host_cert, const uint8_t *host_nonce,
-              const uint8_t *host_key_point)
+              const uint8_t *host_cert)
 {
     MMC *mmc = calloc(1, sizeof(MMC));
 
     if (host_priv_key) memcpy(mmc->host_priv_key, host_priv_key, 20);
     if (host_cert) memcpy(mmc->host_cert, host_cert, 92);
 
-    if (host_nonce) {
-        memcpy(mmc->host_nonce, host_nonce, 20);
-
-    } else {
+    {
         crypto_create_nonce(mmc->host_nonce, sizeof(mmc->host_nonce));
 
         char str[sizeof(mmc->host_nonce)*2 + 1];
@@ -376,10 +372,7 @@ MMC *mmc_open(const char *path, const uint8_t 
*host_priv_key,
               print_hex(str, mmc->host_nonce, sizeof(mmc->host_nonce)));
     }
 
-    if (host_key_point) {
-        memcpy(mmc->host_key_point, host_key_point, 40);
-
-    } else {
+    {
         crypto_create_host_key_pair(mmc->host_key, mmc->host_key_point);
 
         char    str[sizeof(mmc->host_key_point)*2 + 1];
diff --git a/src/libaacs/mmc.h b/src/libaacs/mmc.h
index ca9afcd..8ae2b27 100644
--- a/src/libaacs/mmc.h
+++ b/src/libaacs/mmc.h
@@ -27,9 +27,8 @@
 typedef struct mmc MMC;
 
 AACS_PRIVATE MMC *mmc_open(const char *path, const uint8_t *host_priv_key,
-                           const uint8_t *host_cert, const uint8_t *host_nonce,
-                           const uint8_t *host_key_point);
-AACS_PRIVATE void mmc_close(MMC *drive);
+                           const uint8_t *host_cert);
+AACS_PRIVATE void mmc_close(MMC *mmc);
 AACS_PRIVATE int mmc_read_vid(MMC *mmc, uint8_t *vid);
 
 #endif /* MMC_H_ */

_______________________________________________
libaacs-devel mailing list
libaacs-devel@videolan.org
http://mailman.videolan.org/listinfo/libaacs-devel

Reply via email to