diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2001-06-19 22:30:40 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2001-06-19 22:30:40 +0000 |
commit | 323f289c480b0a8eb15ed3be2befbcc0f86e8904 (patch) | |
tree | a8f18dde28ce3c77b7bff50c2b45a44c556dfed4 /crypto/md2 | |
parent | a45e4a5537e009761652db0d9aa1ef28b1ce8937 (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/md2')
-rw-r--r-- | crypto/md2/md2test.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/md2/md2test.c b/crypto/md2/md2test.c index 70725ef917..78901475eb 100644 --- a/crypto/md2/md2test.c +++ b/crypto/md2/md2test.c @@ -67,7 +67,7 @@ int main(int argc, char *argv[]) return(0); } #else -#include <openssl/md2.h> +#include <openssl/evp.h> #ifdef CHARSET_EBCDIC #include <openssl/ebcdic.h> @@ -100,13 +100,15 @@ int main(int argc, char *argv[]) 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()); + p=pt(md); if (strcmp(p,*R) != 0) { printf("error calculating MD2 on '%s'\n",*P); |