From f7c808dc05110e999c4f888cb5aa71b01a06c53f Mon Sep 17 00:00:00 2001 From: Kaleb S. KEITHLEY Date: Oct 13 2016 12:11:58 +0000 Subject: 3.8.5 GA --- diff --git a/glusterfs-3.8.5.xlators.crypt.patch b/glusterfs-3.8.5.xlators.crypt.patch new file mode 100644 index 0000000..abf3663 --- /dev/null +++ b/glusterfs-3.8.5.xlators.crypt.patch @@ -0,0 +1,48 @@ +--- glusterfs-3.8.5/xlators/encryption/crypt/src/keys.c.orig 2016-10-13 05:44:08.218131827 -0400 ++++ glusterfs-3.8.5/xlators/encryption/crypt/src/keys.c 2016-10-13 07:56:39.783730111 -0400 +@@ -113,29 +113,41 @@ + static void kderive_update(struct kderive_context *ctx) + { + uint32_t i; ++#if (OPENSSL_VERSION_NUMBER < 0x1010002f) + HMAC_CTX hctx; ++#endif ++ HMAC_CTX *phctx = NULL; + unsigned char *pos = ctx->out; + uint32_t *p_iter = (uint32_t *)ctx->fid; + uint32_t num_iters = ctx->out_len / PRF_OUTPUT_SIZE; + + check_prf_iters(num_iters); + ++#if (OPENSSL_VERSION_NUMBER < 0x1010002f) + HMAC_CTX_init(&hctx); ++ phctx = &hctx; ++#else ++ phctx = HMAC_CTX_new(); ++#endif + for (i = 0; i < num_iters; i++) { + /* + * update the iteration number in the fid + */ + *p_iter = htobe32(i); +- HMAC_Init_ex(&hctx, ++ HMAC_Init_ex(phctx, + ctx->pkey, ctx->pkey_len >> 3, + EVP_sha256(), + NULL); +- HMAC_Update(&hctx, ctx->fid, ctx->fid_len); +- HMAC_Final(&hctx, pos, NULL); ++ HMAC_Update(phctx, ctx->fid, ctx->fid_len); ++ HMAC_Final(phctx, pos, NULL); + + pos += PRF_OUTPUT_SIZE; + } +- HMAC_CTX_cleanup(&hctx); ++#if (OPENSSL_VERSION_NUMBER < 0x1010002f) ++ HMAC_CTX_cleanup(phctx); ++#else ++ HMAC_CTX_free(phctx); ++#endif + } + + static void kderive_final(struct kderive_context *ctx, unsigned char *child)