X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fevp%2Fm_md5.c;h=21288ee6361e9183b2eb7b2ca04eb8de225b5719;hb=63d740752f1997420d008f7fdf7c0aad2eff5901;hp=d65db9aa1dd054b9b59c40638c707d612ed6e45d;hpb=7dfb0b774e6592dcbfe47015168a0ac8b44e2a17;p=oweals%2Fopenssl.git diff --git a/crypto/evp/m_md5.c b/crypto/evp/m_md5.c index d65db9aa1d..21288ee636 100644 --- a/crypto/evp/m_md5.c +++ b/crypto/evp/m_md5.c @@ -58,24 +58,42 @@ #include #include "cryptlib.h" -#include "evp.h" -#include "objects.h" -#include "x509.h" -static EVP_MD md5_md= +#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,size_t 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 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() +const EVP_MD *EVP_md5(void) { return(&md5_md); } +#endif