X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fsha%2Fsha.h;h=16cacf9fc01b2733e337493864769ec11e16478f;hb=ddb6b965da0087dadea5488fe11646e3777c66e1;hp=f25512e5e68c93a1a0f8402c2e7123acc62cfddf;hpb=f7fc4ca1dd98153e8e21ecbd1fb4fd45c8a14011;p=oweals%2Fopenssl.git diff --git a/crypto/sha/sha.h b/crypto/sha/sha.h index f25512e5e6..16cacf9fc0 100644 --- a/crypto/sha/sha.h +++ b/crypto/sha/sha.h @@ -60,6 +60,7 @@ #define HEADER_SHA_H #include +#include #ifdef __cplusplus extern "C" { @@ -80,7 +81,7 @@ extern "C" { * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ -#if defined(OPENSSL_SYS_WIN16) || defined(__LP32__) +#if defined(__LP32__) #define SHA_LONG unsigned long #elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) #define SHA_LONG unsigned long @@ -101,7 +102,7 @@ typedef struct SHAstate_st SHA_LONG h0,h1,h2,h3,h4; SHA_LONG Nl,Nh; SHA_LONG data[SHA_LBLOCK]; - int num; + unsigned int num; } SHA_CTX; #ifndef OPENSSL_NO_SHA0 @@ -148,6 +149,7 @@ void SHA256_Transform(SHA256_CTX *c, const unsigned char *data); #define SHA384_DIGEST_LENGTH 48 #define SHA512_DIGEST_LENGTH 64 +#ifndef OPENSSL_NO_SHA512 /* * Unlike 32-bit digest algorithms, SHA-512 *relies* on SHA_LONG64 * being exactly 64-bit wide. See Implementation Notes in sha512.c @@ -159,6 +161,9 @@ void SHA256_Transform(SHA256_CTX *c, const unsigned char *data); #if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__) #define SHA_LONG64 unsigned __int64 #define U64(C) C##UI64 +#elif defined(__arch64__) +#define SHA_LONG64 unsigned long +#define U64(C) C##UL #else #define SHA_LONG64 unsigned long long #define U64(C) C##ULL @@ -174,6 +179,7 @@ typedef struct SHA512state_st } u; unsigned int num,md_len; } SHA512_CTX; +#endif #ifndef OPENSSL_NO_SHA512 int SHA384_Init(SHA512_CTX *c);