From cf544d0f4c008bdd8f0f289ddc77798f8045771b Mon Sep 17 00:00:00 2001 From: Marc Hoersken Date: Tue, 22 Dec 2015 13:38:10 +0100 Subject: [PATCH] wincng.c: fixed _libssh2_wincng_hash_final return value _libssh2_wincng_hash_final was returning the internal BCRYPT status code instead of a valid libssh2 return value (0 or -1). This also means that _libssh2_wincng_hash never returned 0. --- src/wincng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wincng.c b/src/wincng.c index 6fa59d2..635b3e3 100755 --- a/src/wincng.c +++ b/src/wincng.c @@ -406,7 +406,7 @@ _libssh2_wincng_hash_final(_libssh2_wincng_hash_ctx *ctx, ctx->pbHashObject = NULL; ctx->dwHashObject = 0; - return ret; + return BCRYPT_SUCCESS(ret) ? 0 : -1; } int