]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Common header file change not directly applicable to open-vm-tools
authorOliver Kurth <okurth@vmware.com>
Fri, 26 Oct 2018 17:44:56 +0000 (10:44 -0700)
committerOliver Kurth <okurth@vmware.com>
Fri, 26 Oct 2018 17:44:56 +0000 (10:44 -0700)
open-vm-tools/lib/include/sha1.h

index 542af305a846fd0222cebe2230b44f70acb855cf..df49d8aa613c865ff63132a90a0bb0d4b2116b27 100644 (file)
@@ -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