提交 d58caee7 编写于 作者: A Andy Polyakov

EVP_Digest is size_t-fied, clean up test programs accordingly.

上级 e39c2548
......@@ -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)
{
......
......@@ -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)
{
......
......@@ -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)
{
......
......@@ -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);
......
......@@ -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)
{
......
......@@ -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)
{
......
......@@ -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)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册