Avoid compiler warnings.
authorDr. Stephen Henson <steve@openssl.org>
Wed, 21 Jul 2004 17:35:49 +0000 (17:35 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Wed, 21 Jul 2004 17:35:49 +0000 (17:35 +0000)
fips/fingerprint.sha1
fips/fips.c
fips/rsa/fingerprint.sha1
fips/rsa/fips_rsa_selftest.c

index 4579b741dbdbe3ec87d0679d0c1375d8c278fa55..4c6a2db1ace2f166c408100a531216b67b9f3833 100644 (file)
@@ -1,4 +1,4 @@
-HMAC-SHA1(fips.c)= 01d0a11be4f9c2cb2b2a57ab6ec473f61b206de6
+HMAC-SHA1(fips.c)= 5d2cc58767613ab8fb98927eaa2015f357dd4012
 HMAC-SHA1(fips_err_wrapper.c)= d3e2be316062510312269e98f964cb87e7577898
 HMAC-SHA1(fips.h)= e793b0a7017d57a37b89743cf59b40a30385b63f
 HMAC-SHA1(fips_err.h)= 4a73f2a88e206f1f88edfd9b26609a0eed818491
index 3a1a733be6243948eb3145bf5386f66d5452294c..0fe28125046c94b95da6b64e80d52f2c5bc18fa7 100644 (file)
@@ -79,10 +79,10 @@ int FIPS_selftest()
 
 static int FIPS_check_exe(const char *path)
     {
-    char buf[1024];
+    unsigned char buf[1024];
     char p2[PATH_MAX];
-    int n;
-    char mdbuf[EVP_MAX_MD_SIZE];
+    unsigned int n;
+    unsigned char mdbuf[EVP_MAX_MD_SIZE];
     FILE *f;
     static char key[]="etaonrishdlcupfm";
     HMAC_CTX hmac;
index d4dcbdcb8b5b7237a24e5db4a5097059d3e84fbf..8b42e7506d9855f3e81a8ba7dde4f0465aa20a48 100644 (file)
@@ -1,3 +1,3 @@
 HMAC-SHA1(fips_rsa_eay.c)= 660512794d0a702fc2bf17ae094e9e3181bf9152
 HMAC-SHA1(fips_rsa_gen.c)= 6bcf339dda5bb7d7e162c30d579431848a5e921f
-HMAC-SHA1(fips_rsa_selftest.c)= af5b9c9a0237b2219f375849a5b2311d786e711b
+HMAC-SHA1(fips_rsa_selftest.c)= ed69ec28f12af451b8e694e52ac8b6c9bffc0db2
index cf3bf02aabd233a56a9015b47a4e91bfd1f867d4..d5a6a95f77a59affba0cd3791117321828ef7eec 100644 (file)
@@ -160,7 +160,7 @@ int FIPS_selftest_rsa()
        "\xab\xcd\xef\x12\x34\x56\x78\x9a\xbc\xde\xf0\x12\x34\x56\x78\x9a"
        "\xcd\xef\x12\x34\x56\x78\x9a\xbc\xde\xf0\x12\x34\x56\x78\x9a\xbc"
        "\xef\x12\x34\x56\x78\x9a\xbc\xde\xf0\x12\x34\x56\x78\x9a\xbc\xde";
-    int n;
+    int i;
 
     /* Perform pairwise consistency test by: ... */
 
@@ -169,19 +169,19 @@ int FIPS_selftest_rsa()
     /* ...1) apply public key to plaintext, resulting ciphertext must be
      * different
     */
-    n=RSA_public_encrypt(sizeof(original_ptext)-1,original_ptext,ctext,key,
+    i=RSA_public_encrypt(sizeof(original_ptext)-1,original_ptext,ctext,key,
                         RSA_NO_PADDING);
-    if(n < 0)
+    if(i < 0)
        {
        ERR_print_errors_fp(stderr);
        exit(1);
        }
-    if(n != clen || memcmp(ctext,expected_ctext,n))
+    if(i != clen || memcmp(ctext,expected_ctext,i))
        {
        FIPSerr(FIPS_F_FIPS_SELFTEST_RSA,FIPS_R_SELFTEST_FAILED);
        return 0;
        }
-    if(!memcmp(ctext,original_ptext,n))
+    if(!memcmp(ctext,original_ptext,i))
        {
        FIPSerr(FIPS_F_FIPS_SELFTEST_RSA,FIPS_R_SELFTEST_FAILED);
        return 0;
@@ -189,13 +189,13 @@ int FIPS_selftest_rsa()
     /* ...2) apply private key to ciphertext and compare result to
      *       original plaintext; results must be equal
     */
-    n=RSA_private_decrypt(n,ctext,ptext,key,RSA_NO_PADDING);
-    if(n < 0)
+    i=RSA_private_decrypt(i,ctext,ptext,key,RSA_NO_PADDING);
+    if(i < 0)
        {
        ERR_print_errors_fp(stderr);
        exit(1);
        }
-    if(n != sizeof(original_ptext)-1 || memcmp(ptext,original_ptext,n))
+    if(i != sizeof(original_ptext)-1 || memcmp(ptext,original_ptext,i))
        {
        FIPSerr(FIPS_F_FIPS_SELFTEST_RSA,FIPS_R_SELFTEST_FAILED);
        return 0;