#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <openssl/md2.h>
-#ifdef NO_MD2
+#ifdef OPENSSL_NO_MD2
int main(int argc, char *argv[])
{
printf("No MD2 support\n");
return(0);
}
#else
-#include <openssl/md2.h>
+#include <openssl/evp.h>
#ifdef CHARSET_EBCDIC
#include <openssl/ebcdic.h>
int i,err=0;
char **P,**R;
char *p;
+ unsigned char md[MD2_DIGEST_LENGTH];
P=test;
R=ret;
i=1;
while (*P != NULL)
{
- p=pt(MD2((unsigned char *)*P,(unsigned long)strlen(*P),NULL));
+ EVP_Digest((unsigned char *)*P,(unsigned long)strlen(*P),md,NULL,EVP_md2(), NULL);
+ p=pt(md);
if (strcmp(p,*R) != 0)
{
printf("error calculating MD2 on '%s'\n",*P);