X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fevp%2Fm_sha.c;h=acb7a44c5ebe49cc2b93d4fd94fe9b5fced76fc7;hp=42309ebc4648cc1ac4d5f6a21e9eb07e06801e61;hb=26188931147826e280c73ac2692081ce230885c6;hpb=135883505078a868349e0a3c24514099e3cb2dac diff --git a/crypto/evp/m_sha.c b/crypto/evp/m_sha.c index 42309ebc46..acb7a44c5e 100644 --- a/crypto/evp/m_sha.c +++ b/crypto/evp/m_sha.c @@ -63,14 +63,25 @@ #include #include +static int init(EVP_MD_CTX *ctx) + { return SHA_Init(ctx->md_data); } + +static int update(EVP_MD_CTX *ctx,const void *data,unsigned long count) + { return SHA_Update(ctx->md_data,data,count); } + +static int final(EVP_MD_CTX *ctx,unsigned char *md) + { return SHA_Final(md,ctx->md_data); } + static const EVP_MD sha_md= { NID_sha, NID_shaWithRSAEncryption, SHA_DIGEST_LENGTH, - SHA_Init, - SHA_Update, - SHA_Final, + 0, + init, + update, + final, + NULL, EVP_PKEY_RSA_method, SHA_CBLOCK, sizeof(EVP_MD *)+sizeof(SHA_CTX),