-/* crypto/mdc2/mdc2test.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
unsigned char md[MDC2_DIGEST_LENGTH];
int i;
EVP_MD_CTX *c;
- static char *text = "Now is the time for all ";
+ static char text[30] = "Now is the time for all ";
# ifdef CHARSET_EBCDIC
ebcdic2ascii(text, text, strlen(text));
# endif
- c = EVP_MD_CTX_create();
+ c = EVP_MD_CTX_new();
EVP_DigestInit_ex(c, EVP_mdc2(), NULL);
EVP_DigestUpdate(c, (unsigned char *)text, strlen(text));
EVP_DigestFinal_ex(c, &(md[0]), NULL);
} else
printf("pad2 - ok\n");
- EVP_MD_CTX_destroy(c);
-# ifdef OPENSSL_SYS_NETWARE
- if (ret)
- printf("ERROR: %d\n", ret);
-# endif
+ EVP_MD_CTX_free(c);
EXIT(ret);
}
#endif