This patch makes 3 minor functional fixes:

testcases/common/common.c:
Print hexdumps to stderr instead of stdout, since most uses of hex dumps in the 
testcases are to show a mismatch when a test fails.

testcases/driver/des_func.c:
Fix a bad check on a return code

testcases/driver/md5.c:
add a real prototype to the Transform function

Signed-off-by: Kent Yoder <[email protected]>

diff --git a/testcases/common/common.c b/testcases/common/common.c
index 07d324c..04df6b7 100644
--- a/testcases/common/common.c
+++ b/testcases/common/common.c
@@ -84,10 +84,10 @@ void print_hex( CK_BYTE *buf, CK_ULONG len )
 
    while (i < len) {
       for (j=0; (j < 16) && (i < len); j++, i++)
-         printf("%02x ", buf[i] );
-      printf("\n");
+         fprintf(stderr, "%02x ", buf[i] );
+      fprintf(stderr, "\n");
    }
-   printf("\n");
+   fprintf(stderr, "\n");
 }
 
 void usage (char *fct)
diff --git a/testcases/driver/des_func.c b/testcases/driver/des_func.c
index 8722695..b16f387 100755
--- a/testcases/driver/des_func.c
+++ b/testcases/driver/des_func.c
@@ -2214,7 +2214,7 @@ CK_RV des_functions()
 
        GetSystemTime(&t1);
        rc = do_EncryptDES_CBC_PAD();
-       if (!rc) {
+       if (rc) {
                PRINT_ERR("ERROR do_EncryptDES_CBC_PAD failed, rc = 0x%lx\n", 
rc);
                if (!no_stop)
                        return rc;
diff --git a/testcases/driver/md5.c b/testcases/driver/md5.c
index f15de77..bf5ff22 100755
--- a/testcases/driver/md5.c
+++ b/testcases/driver/md5.c
@@ -45,7 +45,7 @@
  */
 
 /* forward declaration */
-static void Transform ();
+static void Transform (UINT4 *buf, UINT4 *in);
 
 static unsigned char PADDING[64] = {
        0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Opencryptoki-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opencryptoki-tech

Reply via email to