Stop warnings:
authorDr. Stephen Henson <steve@openssl.org>
Fri, 9 Apr 2004 21:56:14 +0000 (21:56 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Fri, 9 Apr 2004 21:56:14 +0000 (21:56 +0000)
Signed/unsigned mismatches.
Unused functions.
C++ style coments.

apps/dgst.c
crypto/des/cfb64ede.c
fips/sha1/fips_standalone_sha1.c

index ea923a6fbdbbb271f5d88e1889f928c69563006a..75990a2fb1d05780c2a1fe820523c254538700d7 100644 (file)
@@ -390,7 +390,7 @@ int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
          EVP_PKEY *key, unsigned char *sigin, int siglen, const char *title,
          const char *file,BIO *bmd,const char *hmac_key)
        {
-       int len;
+       unsigned int len;
        int i;
        EVP_MD_CTX *md_ctx;
 
index 5a54c110263b069588ed78162b0183196f342ae2..f422fef1d6cfa9fab127d93fec0e09dc638eaeb0 100644 (file)
@@ -151,7 +151,7 @@ void DES_ede3_cfb_encrypt(const unsigned char *in,unsigned char *out,
                          DES_cblock *ivec,int enc)
        {
        register DES_LONG d0,d1,v0,v1;
-       register unsigned long l=length;
+       register long l=length;
        register int num=numbits,n=(numbits+7)/8,i;
        DES_LONG ti[2];
        unsigned char *iv;
index b65f0c1da76df7bae28756e3b5cb5dd8651872eb..2c5cd44dd78590f22d751eae521fe4cf8e73715d 100644 (file)
 #include <openssl/opensslconf.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 
 int FIPS_selftest_fail;
 
+#if 0
+
 static void hmac_init(SHA_CTX *md_ctx,SHA_CTX *i_ctx,SHA_CTX *o_ctx,
                      const char *key)
     {
@@ -65,11 +68,11 @@ static void hmac_init(SHA_CTX *md_ctx,SHA_CTX *i_ctx,SHA_CTX *o_ctx,
 
     if (len > SHA_CBLOCK)
        {
-       //      EVP_DigestInit_ex(&ctx->md_ctx,md, impl);
+       /*      EVP_DigestInit_ex(&ctx->md_ctx,md, impl); */
        SHA1_Init(md_ctx);
-       //      EVP_DigestUpdate(&ctx->md_ctx,key,len);
+       /*      EVP_DigestUpdate(&ctx->md_ctx,key,len); */
        SHA1_Update(md_ctx,key,len);
-       //      EVP_DigestFinal_ex(&(ctx->md_ctx),ctx->key,&ctx->key_length);
+       /*      EVP_DigestFinal_ex(&(ctx->md_ctx),ctx->key,&ctx->key_length); */
        SHA1_Final(keymd,md_ctx);
        len=20;
        }
@@ -79,35 +82,37 @@ static void hmac_init(SHA_CTX *md_ctx,SHA_CTX *i_ctx,SHA_CTX *o_ctx,
 
     for(i=0 ; i < HMAC_MAX_MD_CBLOCK ; i++)
        pad[i]=0x36^keymd[i];
-    //    EVP_DigestInit_ex(&ctx->i_ctx,md, impl);
+    /*    EVP_DigestInit_ex(&ctx->i_ctx,md, impl); */
     SHA1_Init(md_ctx);
-    //    EVP_DigestUpdate(&ctx->i_ctx,pad,EVP_MD_block_size(md));
+    /*    EVP_DigestUpdate(&ctx->i_ctx,pad,EVP_MD_block_size(md)); */
     SHA1_Update(md_ctx,pad,SHA_CBLOCK);
 
     for(i=0 ; i < HMAC_MAX_MD_CBLOCK ; i++)
        pad[i]=0x5c^keymd[i];
-    //    EVP_DigestInit_ex(&ctx->o_ctx,md, impl);
+    /*    EVP_DigestInit_ex(&ctx->o_ctx,md, impl); */
     SHA1_Init(o_ctx);
-    //    EVP_DigestUpdate(&ctx->o_ctx,pad,EVP_MD_block_size(md));
+    /*    EVP_DigestUpdate(&ctx->o_ctx,pad,EVP_MD_block_size(md)); */
     SHA1_Update(o_ctx,pad,SHA_CBLOCK);
-    //    EVP_MD_CTX_copy_ex(&ctx->md_ctx,&ctx->i_ctx);
-    //    memcpy(md_ctx,i_ctx,sizeof *md_ctx);
+    /*    EVP_MD_CTX_copy_ex(&ctx->md_ctx,&ctx->i_ctx); */
+    /*    memcpy(md_ctx,i_ctx,sizeof *md_ctx); */
     }
 
 static void hmac_final(unsigned char *md,SHA_CTX *md_ctx,SHA_CTX *o_ctx)
     {
     unsigned char buf[20];
 
-    //EVP_DigestFinal_ex(&ctx->md_ctx,buf,&i);
+    /*EVP_DigestFinal_ex(&ctx->md_ctx,buf,&i); */
     SHA1_Final(buf,md_ctx);
-    //EVP_MD_CTX_copy_ex(&ctx->md_ctx,&ctx->o_ctx);
-    //    memcpy(md_ctx,o_ctx,sizeof *md_ctx);
-    //EVP_DigestUpdate(&ctx->md_ctx,buf,i);
+    /*EVP_MD_CTX_copy_ex(&ctx->md_ctx,&ctx->o_ctx); */
+    /*    memcpy(md_ctx,o_ctx,sizeof *md_ctx); */
+    /*EVP_DigestUpdate(&ctx->md_ctx,buf,i); */
     SHA1_Update(o_ctx,buf,sizeof buf);
-    //EVP_DigestFinal_ex(&ctx->md_ctx,md,len);
+    /*EVP_DigestFinal_ex(&ctx->md_ctx,md,len); */
     SHA1_Final(md,o_ctx);
     }
 
+#endif
+
 int main(int argc,char **argv)
     {
 #ifdef OPENSSL_FIPS