From d58caee734298d61b2ec119bfa31bc42a9d55480 Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Thu, 22 Jul 2004 10:25:52 +0000 Subject: [PATCH] EVP_Digest is size_t-fied, clean up test programs accordingly. --- crypto/md2/md2test.c | 2 +- crypto/md4/md4test.c | 2 +- crypto/md5/md5test.c | 2 +- crypto/rc4/rc4.c | 3 ++- crypto/ripemd/rmdtest.c | 2 +- crypto/sha/sha1test.c | 2 +- crypto/sha/shatest.c | 2 +- 7 files changed, 8 insertions(+), 7 deletions(-) diff --git a/crypto/md2/md2test.c b/crypto/md2/md2test.c index 13cbec4ab0..21b381c351 100644 --- a/crypto/md2/md2test.c +++ b/crypto/md2/md2test.c @@ -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) { diff --git a/crypto/md4/md4test.c b/crypto/md4/md4test.c index 21a77d96f7..5da53382c9 100644 --- a/crypto/md4/md4test.c +++ b/crypto/md4/md4test.c @@ -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) { diff --git a/crypto/md5/md5test.c b/crypto/md5/md5test.c index 667b6be344..0628053fa7 100644 --- a/crypto/md5/md5test.c +++ b/crypto/md5/md5test.c @@ -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) { diff --git a/crypto/rc4/rc4.c b/crypto/rc4/rc4.c index b39c070292..c900b26055 100644 --- a/crypto/rc4/rc4.c +++ b/crypto/rc4/rc4.c @@ -60,6 +60,7 @@ #include #include #include +#include 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); diff --git a/crypto/ripemd/rmdtest.c b/crypto/ripemd/rmdtest.c index d4c709e646..cbfdf2ae6f 100644 --- a/crypto/ripemd/rmdtest.c +++ b/crypto/ripemd/rmdtest.c @@ -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) { diff --git a/crypto/sha/sha1test.c b/crypto/sha/sha1test.c index cddd598f22..b0650c7254 100644 --- a/crypto/sha/sha1test.c +++ b/crypto/sha/sha1test.c @@ -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) { diff --git a/crypto/sha/shatest.c b/crypto/sha/shatest.c index ddb388b670..d007cf13ed 100644 --- a/crypto/sha/shatest.c +++ b/crypto/sha/shatest.c @@ -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) { -- GitLab