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