X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fevp%2Fm_dss.c;h=4ad63ada6fe228c859eccbac137c63f5c3d1d218;hb=e6ccc6ed70ca66c12737fbd9d35dfa6e588883aa;hp=743beacc5bf68de46789d56f04d438de7dba1e80;hpb=d02b48c63a58ea4367a0e905979f140b7d090f86;p=oweals%2Fopenssl.git diff --git a/crypto/evp/m_dss.c b/crypto/evp/m_dss.c index 743beacc5b..4ad63ada6f 100644 --- a/crypto/evp/m_dss.c +++ b/crypto/evp/m_dss.c @@ -1,5 +1,5 @@ /* crypto/evp/m_dss.c */ -/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * * This package is an SSL implementation written @@ -58,23 +58,44 @@ #include #include "cryptlib.h" -#include "evp.h" -#include "objects.h" -#include "x509.h" +#include +#include +#include +#ifndef OPENSSL_NO_DSA +#include +#endif -static EVP_MD dsa_md= +#ifndef OPENSSL_NO_SHA +#ifndef OPENSSL_FIPS + +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 dsa_md= { NID_dsaWithSHA, NID_dsaWithSHA, SHA_DIGEST_LENGTH, - SHA_Init, - SHA_Update, - SHA_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_dss() +const EVP_MD *EVP_dss(void) { return(&dsa_md); } - +#endif +#endif