From: Oliver Kurth Date: Fri, 26 Oct 2018 17:44:56 +0000 (-0700) Subject: Common header file change not directly applicable to open-vm-tools X-Git-Tag: stable-11.0.0~384 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6781303c4c4c5d80116a607b390d435def0a5c15;p=thirdparty%2Fopen-vm-tools.git Common header file change not directly applicable to open-vm-tools --- diff --git a/open-vm-tools/lib/include/sha1.h b/open-vm-tools/lib/include/sha1.h index 542af305a..df49d8aa6 100644 --- a/open-vm-tools/lib/include/sha1.h +++ b/open-vm-tools/lib/include/sha1.h @@ -136,6 +136,27 @@ void SHA1MultiBuffer(uint32 numBuffers, #endif // defined __APPLE__ && defined USERLEVEL +#if !defined VMKBOOT && !defined VMKERNEL + +/* OpenSSL opaque type for hashing. Opaque as of openssl-1.1.0. */ +struct env_md_ctx_st; + +typedef struct { +#ifdef __APPLE__ + CC_SHA1_CTX cc_ctx; +#else + struct env_md_ctx_st *md; /* OpenSSL EVP_MD_CTX */ +#endif +} CryptoSHA1_CTX; + +void CryptoSHA1_Init(CryptoSHA1_CTX *ctx); +void CryptoSHA1_Update(CryptoSHA1_CTX *ctx, + const unsigned char *data, + size_t len); +void CryptoSHA1_Final(unsigned char digest[SHA1_HASH_LEN], + CryptoSHA1_CTX *ctx); +#endif + #if defined(__cplusplus) } // extern "C" #endif