]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
crypto/fsl: Make function names consistent for blob encapsulation/decapsulation.
authorgaurav rana <gaurav.rana@freescale.com>
Wed, 25 Feb 2015 04:07:09 +0000 (09:37 +0530)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 1 Sep 2015 12:05:52 +0000 (14:05 +0200)
This patch does the following:

1. The function names for encapsulation and decapsulation
were inconsitent in freescale's implementation and cmd_blob file.
This patch corrects the issues.
2. The function protopye is also modified to change the length parameter
from u8 to u32 to allow encapsulation and decapsulation of larger images.
3. Modified the description of km paramter in the command usage for better
readability.

Signed-off-by: Gaurav Rana <gaurav.rana@freescale.com>
Reviewed-by: Ruchika Gupta <ruchika.gupta@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
common/cmd_blob.c
drivers/crypto/fsl/fsl_blob.c

index 82ecaf09e5e338b6e64561071ac28ffae20bf76e..d3f22a1afc908fd16c7ff41873c4aa133ccea092 100644 (file)
@@ -90,17 +90,19 @@ static char blob_help_text[] =
        "enc src dst len km - Encapsulate and create blob of data\n"
        "                          $len bytes long at address $src and\n"
        "                          store the result at address $dst.\n"
-       "                          $km is the 16 byte key modifier\n"
-       "                          is also required for generation/use as\n"
-       "                          key for cryptographic operation. Key\n"
-       "                          modifier should be 16 byte long.\n"
+       "                          $km is the address where the key\n"
+       "                          modifier is stored.\n"
+       "                          The modifier is required for generation\n"
+       "                          /use as key for cryptographic operation.\n"
+       "                          Key modifier should be 16 byte long.\n"
        "blob dec src dst len km - Decapsulate the  blob of data at address\n"
        "                          $src and store result of $len byte at\n"
        "                          addr $dst.\n"
-       "                          $km is the 16 byte key modifier\n"
-       "                          is also required for generation/use as\n"
-       "                          key for cryptographic operation. Key\n"
-       "                          modifier should be 16 byte long.\n";
+       "                          $km is the address where the key\n"
+       "                          modifier is stored.\n"
+       "                          The modifier is required for generation\n"
+       "                          /use as key for cryptographic operation.\n"
+       "                          Key modifier should be 16 byte long.\n";
 
 U_BOOT_CMD(
        blob, 6, 1, do_blob,
index bc0107521c59070dde98a787f9012ff5a1fbedbf..9923bcbfe95b9117e36d040d6210649b21bfe2db 100644 (file)
@@ -11,7 +11,7 @@
 #include "desc.h"
 #include "jr.h"
 
-int blob_decrypt(u8 *key_mod, u8 *src, u8 *dst, u8 len)
+int blob_decap(u8 *key_mod, u8 *src, u8 *dst, u32 len)
 {
        int ret, i = 0;
        u32 *desc;
@@ -36,7 +36,7 @@ int blob_decrypt(u8 *key_mod, u8 *src, u8 *dst, u8 len)
        return ret;
 }
 
-int blob_encrypt(u8 *key_mod, u8 *src, u8 *dst, u8 len)
+int blob_encap(u8 *key_mod, u8 *src, u8 *dst, u32 len)
 {
        int ret, i = 0;
        u32 *desc;