diff options
Diffstat (limited to 'src/lib/libcrypto/evp/m_sha.c')
| -rw-r--r-- | src/lib/libcrypto/evp/m_sha.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/lib/libcrypto/evp/m_sha.c b/src/lib/libcrypto/evp/m_sha.c index ed54909b16..acccc8f92d 100644 --- a/src/lib/libcrypto/evp/m_sha.c +++ b/src/lib/libcrypto/evp/m_sha.c | |||
| @@ -56,21 +56,22 @@ | |||
| 56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
| 57 | */ | 57 | */ |
| 58 | 58 | ||
| 59 | #if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA0) | ||
| 60 | #include <stdio.h> | 59 | #include <stdio.h> |
| 61 | #include "cryptlib.h" | 60 | #include "cryptlib.h" |
| 62 | /* Including sha.h prior evp.h masks FIPS SHA declarations, but that's | 61 | |
| 63 | * exactly what we want to achieve here... */ | 62 | #if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA0) |
| 64 | #include <openssl/sha.h> | 63 | |
| 65 | #include <openssl/evp.h> | 64 | #include <openssl/evp.h> |
| 66 | #include "evp_locl.h" | ||
| 67 | #include <openssl/objects.h> | 65 | #include <openssl/objects.h> |
| 68 | #include <openssl/x509.h> | 66 | #include <openssl/x509.h> |
| 67 | #ifndef OPENSSL_NO_RSA | ||
| 68 | #include <openssl/rsa.h> | ||
| 69 | #endif | ||
| 69 | 70 | ||
| 70 | static int init(EVP_MD_CTX *ctx) | 71 | static int init(EVP_MD_CTX *ctx) |
| 71 | { return SHA_Init(ctx->md_data); } | 72 | { return SHA_Init(ctx->md_data); } |
| 72 | 73 | ||
| 73 | 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) |
| 74 | { return SHA_Update(ctx->md_data,data,count); } | 75 | { return SHA_Update(ctx->md_data,data,count); } |
| 75 | 76 | ||
| 76 | static int final(EVP_MD_CTX *ctx,unsigned char *md) | 77 | static int final(EVP_MD_CTX *ctx,unsigned char *md) |
