X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fevp%2Fm_md5.c;h=a214315abe5c91cb14be55d48fcbc02ec69d56e2;hp=18531b67a05485066fb57178dd1ae468827cb56e;hb=1c7a0e2856bce20267174375fd66007fa172354d;hpb=ec577822f95a8bca0023c5c77cef1a4916822d4a diff --git a/crypto/evp/m_md5.c b/crypto/evp/m_md5.c index 18531b67a0..a214315abe 100644 --- a/crypto/evp/m_md5.c +++ b/crypto/evp/m_md5.c @@ -58,24 +58,42 @@ #include #include "cryptlib.h" + +#ifndef OPENSSL_NO_MD5 + #include #include #include +#include +#include + +static int init(EVP_MD_CTX *ctx) + { return MD5_Init(ctx->md_data); } + +static int update(EVP_MD_CTX *ctx,const void *data,unsigned long count) + { return MD5_Update(ctx->md_data,data,count); } + +static int final(EVP_MD_CTX *ctx,unsigned char *md) + { return MD5_Final(md,ctx->md_data); } -static EVP_MD md5_md= +static const EVP_MD md5_md= { NID_md5, NID_md5WithRSAEncryption, MD5_DIGEST_LENGTH, - MD5_Init, - MD5_Update, - MD5_Final, + 0, + init, + update, + final, + NULL, + NULL, EVP_PKEY_RSA_method, MD5_CBLOCK, sizeof(EVP_MD *)+sizeof(MD5_CTX), }; -EVP_MD *EVP_md5(void) +const EVP_MD *EVP_md5(void) { return(&md5_md); } +#endif