EVP_Digest is size_t-fied, clean up test programs accordingly.
authorAndy Polyakov <appro@openssl.org>
Thu, 22 Jul 2004 10:25:52 +0000 (10:25 +0000)
committerAndy Polyakov <appro@openssl.org>
Thu, 22 Jul 2004 10:25:52 +0000 (10:25 +0000)
crypto/md2/md2test.c
crypto/md4/md4test.c
crypto/md5/md5test.c
crypto/rc4/rc4.c
crypto/ripemd/rmdtest.c
crypto/sha/sha1test.c
crypto/sha/shatest.c

index 13cbec4..21b381c 100644 (file)
@@ -110,7 +110,7 @@ int main(int argc, char *argv[])
        i=1;
        while (*P != NULL)
                {
-               EVP_Digest((unsigned char *)*P,(unsigned long)strlen(*P),md,NULL,EVP_md2(), NULL);
+               EVP_Digest((unsigned char *)*P,strlen(*P),md,NULL,EVP_md2(), NULL);
                p=pt(md);
                if (strcmp(p,*R) != 0)
                        {
index 21a77d9..5da5338 100644 (file)
@@ -106,7 +106,7 @@ int main(int argc, char *argv[])
        i=1;
        while (*P != NULL)
                {
-               EVP_Digest(&(P[0][0]),(unsigned long)strlen((char *)*P),md,NULL,EVP_md4(), NULL);
+               EVP_Digest(&(P[0][0]),strlen((char *)*P),md,NULL,EVP_md4(), NULL);
                p=pt(md);
                if (strcmp(p,(char *)*R) != 0)
                        {
index 667b6be..0628053 100644 (file)
@@ -106,7 +106,7 @@ int main(int argc, char *argv[])
        i=1;
        while (*P != NULL)
                {
-               EVP_Digest(&(P[0][0]),(unsigned long)strlen((char *)*P),md,NULL,EVP_md5(), NULL);
+               EVP_Digest(&(P[0][0]),strlen((char *)*P),md,NULL,EVP_md5(), NULL);
                p=pt(md);
                if (strcmp(p,(char *)*R) != 0)
                        {
index b39c070..c900b26 100644 (file)
@@ -60,6 +60,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <openssl/rc4.h>
+#include <openssl/evp.h>
 
 char *usage[]={
 "usage: rc4 args\n",
@@ -162,7 +163,7 @@ bad:
                keystr=buf;
                }
 
-       EVP_Digest((unsigned char *)keystr,(unsigned long)strlen(keystr),md,NULL,EVP_md5());
+       EVP_Digest((unsigned char *)keystr,strlen(keystr),md,NULL,EVP_md5(),NULL);
        OPENSSL_cleanse(keystr,strlen(keystr));
        RC4_set_key(&key,MD5_DIGEST_LENGTH,md);
        
index d4c709e..cbfdf2a 100644 (file)
@@ -115,7 +115,7 @@ int main(int argc, char *argv[])
 #ifdef CHARSET_EBCDIC
                ebcdic2ascii((char *)*P, (char *)*P, strlen((char *)*P));
 #endif
-               EVP_Digest(&(P[0][0]),(unsigned long)strlen((char *)*P),md,NULL,EVP_ripemd160(), NULL);
+               EVP_Digest(&(P[0][0]),strlen((char *)*P),md,NULL,EVP_ripemd160(), NULL);
                p=pt(md);
                if (strcmp(p,(char *)*R) != 0)
                        {
index cddd598..b0650c7 100644 (file)
@@ -123,7 +123,7 @@ int main(int argc, char *argv[])
        i=1;
        while (*P != NULL)
                {
-               EVP_Digest(*P,(unsigned long)strlen((char *)*P),md,NULL,EVP_sha1(), NULL);
+               EVP_Digest(*P,strlen((char *)*P),md,NULL,EVP_sha1(), NULL);
                p=pt(md);
                if (strcmp(p,(char *)*R) != 0)
                        {
index ddb388b..d007cf1 100644 (file)
@@ -123,7 +123,7 @@ int main(int argc, char *argv[])
        i=1;
        while (*P != NULL)
                {
-               EVP_Digest(*P,(unsigned long)strlen((char *)*P),md,NULL,EVP_sha(), NULL);
+               EVP_Digest(*P,strlen((char *)*P),md,NULL,EVP_sha(), NULL);
                p=pt(md);
                if (strcmp(p,(char *)*R) != 0)
                        {