From: Michihiro NAKAJIMA Date: Fri, 4 Dec 2009 06:50:32 +0000 (-0500) Subject: When creationg a hash, a persisted private key is unneeded. X-Git-Tag: v2.8.0~119 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a0fee68dc806055bb4089d54929a3705ec4fccc;p=thirdparty%2Flibarchive.git When creationg a hash, a persisted private key is unneeded. This patch avoids a possibility that calling CryptAcquireContext() cause an accss error. see also http://support.microsoft.com/kb/238187/en-us/ SVN-Revision: 1698 --- diff --git a/libarchive/archive_windows.c b/libarchive/archive_windows.c index 744400282..78fe8c95d 100644 --- a/libarchive/archive_windows.c +++ b/libarchive/archive_windows.c @@ -1162,7 +1162,7 @@ Digest_Init(Digest_CTX *ctx, ALG_ID algId) ctx->valid = 0; if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL, - PROV_RSA_FULL, 0)) { + PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) { if (GetLastError() != NTE_BAD_KEYSET) return; if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL,