X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fevp%2Fm_dss1.c;h=a20056f04b62876a6696ed41e09cfccdcfa809ec;hb=63d740752f1997420d008f7fdf7c0aad2eff5901;hp=ff256b7b20da01e83dc32de875bb2f6a7e8e697d;hpb=58964a492275ca9a59a0cd9c8155cb2491b4b909;p=oweals%2Fopenssl.git diff --git a/crypto/evp/m_dss1.c b/crypto/evp/m_dss1.c index ff256b7b20..a20056f04b 100644 --- a/crypto/evp/m_dss1.c +++ b/crypto/evp/m_dss1.c @@ -58,24 +58,41 @@ #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 +#include + +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, + 0, + 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