X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fevp%2Fm_dss1.c;h=4f03fb70e0263e84566c24d333ddd06b7cee71ce;hp=ff256b7b20da01e83dc32de875bb2f6a7e8e697d;hb=cb877ccb35ae50b34f9a37eb5aa33b8a7ae72e29;hpb=78414a6a897db42c9bcf06aa21c705811ab33921 diff --git a/crypto/evp/m_dss1.c b/crypto/evp/m_dss1.c index ff256b7b20..4f03fb70e0 100644 --- a/crypto/evp/m_dss1.c +++ b/crypto/evp/m_dss1.c @@ -58,24 +58,43 @@ #include #include "cryptlib.h" -#include "evp.h" -#include "objects.h" -#include "x509.h" -static EVP_MD dss1_md= +#ifndef OPENSSL_NO_SHA + +#include +#include +#include +#ifndef OPENSSL_NO_DSA +#include +#endif + +static int init(EVP_MD_CTX *ctx) + { return SHA1_Init(ctx->md_data); } + +static int update(EVP_MD_CTX *ctx,const void *data,size_t count) + { return SHA1_Update(ctx->md_data,data,count); } + +static int final(EVP_MD_CTX *ctx,unsigned char *md) + { return SHA1_Final(md,ctx->md_data); } + +static const EVP_MD dss1_md= { NID_dsa, NID_dsaWithSHA1, SHA_DIGEST_LENGTH, - SHA1_Init, - SHA1_Update, - SHA1_Final, + EVP_MD_FLAG_PKEY_DIGEST, + init, + update, + final, + NULL, + NULL, EVP_PKEY_DSA_method, SHA_CBLOCK, sizeof(EVP_MD *)+sizeof(SHA_CTX), }; -EVP_MD *EVP_dss1() +const EVP_MD *EVP_dss1(void) { return(&dss1_md); } +#endif