summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/m_dss1.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/evp/m_dss1.c')
-rw-r--r--src/lib/libcrypto/evp/m_dss1.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/lib/libcrypto/evp/m_dss1.c b/src/lib/libcrypto/evp/m_dss1.c
index c12e13972b..23b90d0538 100644
--- a/src/lib/libcrypto/evp/m_dss1.c
+++ b/src/lib/libcrypto/evp/m_dss1.c
@@ -56,23 +56,25 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#ifndef OPENSSL_NO_SHA
59#include <stdio.h> 60#include <stdio.h>
60#include "cryptlib.h" 61#include "cryptlib.h"
61
62#ifndef OPENSSL_NO_SHA
63
64#include <openssl/evp.h> 62#include <openssl/evp.h>
65#include <openssl/objects.h> 63#include <openssl/objects.h>
66#include <openssl/x509.h> 64#include <openssl/x509.h>
67#ifndef OPENSSL_NO_DSA
68#include <openssl/dsa.h>
69#endif
70 65
71static int init(EVP_MD_CTX *ctx) 66static int init(EVP_MD_CTX *ctx)
72 { return SHA1_Init(ctx->md_data); } 67 { return SHA1_Init(ctx->md_data); }
73 68
74static int update(EVP_MD_CTX *ctx,const void *data,size_t count) 69static int update(EVP_MD_CTX *ctx,const void *data,unsigned long count)
70#ifndef OPENSSL_FIPS
75 { return SHA1_Update(ctx->md_data,data,count); } 71 { return SHA1_Update(ctx->md_data,data,count); }
72#else
73 {
74 OPENSSL_assert(sizeof(count)<=sizeof(size_t));
75 return SHA1_Update(ctx->md_data,data,count);
76 }
77#endif
76 78
77static int final(EVP_MD_CTX *ctx,unsigned char *md) 79static int final(EVP_MD_CTX *ctx,unsigned char *md)
78 { return SHA1_Final(md,ctx->md_data); } 80 { return SHA1_Final(md,ctx->md_data); }
@@ -82,7 +84,7 @@ static const EVP_MD dss1_md=
82 NID_dsa, 84 NID_dsa,
83 NID_dsaWithSHA1, 85 NID_dsaWithSHA1,
84 SHA_DIGEST_LENGTH, 86 SHA_DIGEST_LENGTH,
85 0, 87 EVP_MD_FLAG_FIPS,
86 init, 88 init,
87 update, 89 update,
88 final, 90 final,