summaryrefslogtreecommitdiffstats
path: root/crypto/md4
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2001-06-19 22:30:40 +0000
committerDr. Stephen Henson <steve@openssl.org>2001-06-19 22:30:40 +0000
commit323f289c480b0a8eb15ed3be2befbcc0f86e8904 (patch)
treea8f18dde28ce3c77b7bff50c2b45a44c556dfed4 /crypto/md4
parenta45e4a5537e009761652db0d9aa1ef28b1ce8937 (diff)
Change all calls to low level digest routines in the library and
applications to use EVP. Add missing calls to HMAC_cleanup() and don't assume HMAC_CTX can be copied using memcpy(). Note: this is almost identical to the patch submitted to openssl-dev by Verdon Walker <VWalker@novell.com> except some redundant EVP_add_digest_()/EVP_cleanup() calls were removed and some changes made to avoid compiler warnings.
Diffstat (limited to 'crypto/md4')
-rw-r--r--crypto/md4/md4test.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/md4/md4test.c b/crypto/md4/md4test.c
index 78bcd4394a..9e8cadb6cd 100644
--- a/crypto/md4/md4test.c
+++ b/crypto/md4/md4test.c
@@ -67,7 +67,7 @@ int main(int argc, char *argv[])
return(0);
}
#else
-#include <openssl/md4.h>
+#include <openssl/evp.h>
static char *test[]={
"",
@@ -96,13 +96,15 @@ int main(int argc, char *argv[])
int i,err=0;
unsigned char **P,**R;
char *p;
+ unsigned char md[MD4_DIGEST_LENGTH];
P=(unsigned char **)test;
R=(unsigned char **)ret;
i=1;
while (*P != NULL)
{
- p=pt(MD4(&(P[0][0]),(unsigned long)strlen((char *)*P),NULL));
+ EVP_Digest(&(P[0][0]),(unsigned long)strlen((char *)*P),md,NULL,EVP_md4());
+ p=pt(md);
if (strcmp(p,(char *)*R) != 0)
{
printf("error calculating MD4 on '%s'\n",*P);