From 3c6c8c3ca5ee834c3dccbab68738329300bb0691 Mon Sep 17 00:00:00 2001 From: quamrulmina Date: Wed, 28 Oct 2015 15:37:02 -0500 Subject: [PATCH] Fix ssh/sshd failing in Windows 7 due to a flag use in cng_digest Avoid using BCRYPT_HASH_REUSABLE_FLAG in cng_digest.c file which was introduced in Windows 8 and not supported in previous OS like Windows 7. --- contrib/win32/win32compat/cng_digest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/win32/win32compat/cng_digest.c b/contrib/win32/win32compat/cng_digest.c index 4847675..da6bb71 100644 --- a/contrib/win32/win32compat/cng_digest.c +++ b/contrib/win32/win32compat/cng_digest.c @@ -144,7 +144,7 @@ struct ssh_digest_ctx * return NULL; } - if ((hr = BCryptCreateHash(ret->cng_alg_handle, &(ret->hash_handle), NULL, 0, NULL, 0, BCRYPT_HASH_REUSABLE_FLAG)) != S_OK) + if ((hr = BCryptCreateHash(ret->cng_alg_handle, &(ret->hash_handle), NULL, 0, NULL, 0, 0)) != S_OK) { BCryptCloseAlgorithmProvider(ret->cng_alg_handle, 0); free(ret);